src.plotting.task_plot_scenario_comparisons¶
Module Contents¶
Functions¶
|
|
|
Plot comparisons between the incidences of several scenarios. |
-
SCHOOL_SCENARIOS= ['spring_educ_open_after_easter_without_tests', 'spring_educ_open_after_easter_with_tests', 'spring_close_educ_after_easter', 'spring_baseline'][source]¶
-
OUTCOMES= ['newly_infected', 'new_known_case', 'newly_deceased', 'share_ever_rapid_test', 'share_rapid_test_in_last_week', 'share_b117', 'share_doing_rapid_test_today', 'ever_vaccinated'][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. If not given, they are plotted if an empirical analogue for the outcome is available.
produces (pathlib.Path) – path where to save the figure