src.plotting.task_plot_scenario_comparisons
¶
Module Contents¶
Functions¶
|
|
|
Plot comparisons between the incidences of several scenarios. |
Attributes¶
A dictionary containing the plots to create. |
|
- 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]¶
- 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.
- 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