reichlab / Covid-19-Hub-Vizualization

2 stars 3 forks source link

streamline outcome variable naming, pass as json rather than calculating in javascript #28

Closed elray1 closed 3 years ago

elray1 commented 3 years ago

There are two goals here:

  1. 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.
  2. 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:

  1. 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"
  2. 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"
  3. 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:

elray1 commented 3 years ago

We decided to standardize on "Incident weekly cases", "Incident daily hospitalizations", "Incident weekly deaths"