load truth data from covidData

load_from_coviddata(
  target_variable,
  truth_source,
  locations = NULL,
  as_of = NULL,
  temporal_resolution,
  truth_end_date,
  hub = c("US", "ECDC")
)

Arguments

target_variable

string specifying target type It should be one or more of "cum death", "inc case", "inc death", "inc hosp".

truth_source

character vector specifying where the truths will be loaded from: currently support "JHU" and "HealthData".

locations

vector of valid location code. The US hub is using FIPS code and the ECDC hub is using country name abbreviation.

as_of

character vector of "as of" dates to use for querying truths in format 'yyyy-mm-dd'. For each spatial unit and temporal reporting unit, the last available data with an issue date on or before the given as_of date are returned.

temporal_resolution

string specifying temporal resolution to include: one of 'daily' or 'weekly'

truth_end_date

date to include the last available truth point in 'yyyy-mm-dd' format.

hub

character, which hub to use. Default is "US", other option is "ECDC"

Value

a data.frame with columns location, target_end_date, target_variable and value