src.plotting.task_plot_scenario_comparisons

Module Contents

Functions

create_parametrization(plots, named_scenarios, fast_flag, outcomes)

task_plot_scenario_comparison(depends_on, outcome, title, colors, name_to_label, scenario_starts, plot_start, empirical, produces)

Plot comparisons between the incidences of several scenarios.

Attributes

_MODULE_DEPENDENCIES[source]
NAMED_SCENARIOS[source]
SCHOOL_SCENARIOS = ['spring_educ_open_after_easter_without_tests', 'spring_educ_open_after_easter_with_tests',...[source]
OUTCOMES = ['newly_infected', 'new_known_case', 'newly_deceased', 'share_ever_rapid_test',...[source]
WITH_VACCINATIONS = vaccinations $\checkmark$[source]
NO_VACCINATIONS = vaccinations $\times$[source]
WITH_SEASONALITY = seasonality $\checkmark$[source]
NO_SEASONALITY = seasonality $\times$[source]
WITH_RAPID_TESTS = rapid tests $\checkmark$[source]
NO_RAPID_TESTS = rapid tests $\times$[source]
PLOTS[source]

A dictionary containing the plots to create.

Each key in the dictionary is a name for a collection of scenarios. The values are dictionaries with the title and the lists of scenario names which are combined to create the collection.

Type

Dict[str, Dict[str, str]]

AVAILABLE_SCENARIOS[source]
plotted_scenarios[source]
not_plotted_scenarios[source]
not_plotted_scenarios[source]
create_parametrization(plots, named_scenarios, fast_flag, outcomes)[source]
task_plot_scenario_comparison(depends_on, outcome, title, colors, name_to_label, scenario_starts, plot_start, empirical, produces)[source]

Plot comparisons between the incidences of several scenarios.

Parameters
  • depends_on (dict) – keys contain py files and scenario names. Values are paths to the dependencies.

  • outcome (str) – name of the incidence to be plotted (e.g. new_known_case or newly_infected).

  • title (str) – custom title, will be formatted with New Observed Cases or Total New Cases depending on the outcome.

  • colors (dict, optional) – keys are scenario names, values are colors.

  • name_to_label (dict, optional) – keys are scenario names, values are the labels to be put in the legend. If None they are generated automatically from the scenario names.

  • plot_start (pandas.Timestamp, optional) – date on which the plot should start. If None, the plot start is the simulation start.

  • empirical (bool, optional) – whether to plot empirical equivalents.

  • produces (pathlib.Path) – path where to save the figure