pandemia.reporters.pygame_coords

Reporters that output a pygame plot

Module Contents

Classes

PygameCoords

Reporter that returns a plot at the end of the simulation. This reporter uses the coordinates

class pandemia.reporters.pygame_coords.PygameCoords(telemetry_bus, config)

Bases: pandemia.reporters.Reporter

Reporter that returns a plot at the end of the simulation. This reporter uses the coordinates of each location to plot the number of people infected each day (daily prevalence) within the geographical area corresponding to each pixel in a rectangular plot of the regions. The style of the plot is that of a heat map, with pixel colour intensity corresponding to the prevalence for that pixel.

initialize(world, number_of_strains)

Intializes reporter

update(clock, current_location, current_infectiousness)

Draws polygonal plots of regions

stop_sim()

Called when the simulation ends.

get_scalar_cmap(cmap, min_val, max_val)

Constucts scalar colour map to represent disease prevalence when rendering