track text for plot labels in json rather than calculating it on the fly in javascript. This will make the code more transferrable to other projects, and simplify adding cumulative deaths to this project later.
reduce the number of different ways we are referring to the same quantity
We currently refer to the names of the outcome variables in three different ways:
the variable names in the drop down menu for "Target Variable". This comes from this json file, and is one of "Cases", "Deaths", or "Hospitalizations"
the description used in the plot title. This is calculated in the javascript here, and is one of "weekly COVID-19 cases", "daily COVID-19 hospitalizations", or "weekly COVID-19 deaths"
the description used for the vertical axis label in the plot. This is calculated in the javascript here, and is one of "Incident weekly cases", "Incident daily hospitalizations", "Incident weekly deaths"
Let's:
[x] decide on a single naming scheme for use in the plot labels -- I prefer the second format, e.g. "Incident weekly cases"
[x] Add the selected text as entries in the json file for target variables in a new field, e.g. "plot_text"
There are two goals here:
We currently refer to the names of the outcome variables in three different ways:
Let's: