pandemia.reporters.pygame_shapes

Reporters that output a pygame plot

Module Contents

Classes

PygameShapes

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

class pandemia.reporters.pygame_shapes.PygameShapes(telemetry_bus, config)

Bases: pandemia.reporters.Reporter

Reporter that returns a plot at the end of the simulation. This reporter uses the shapefiles of each region to plot the number of people infected each day (daily prevalence) in each region. The style of the plot is that of a heat map, with region colour intensity corresponding to the prevalence for that region.

initialize(world, number_of_strains)

Intializes reporter

update(clock, strain_counts)

Draws polygonal plots of regions

get_polygons(world)

Assigns points and polygons to each region if coordinate data exists

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