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")
)
string specifying target type It should be one or more of "cum death", "inc case", "inc death", "inc hosp".
character vector specifying where the truths will
be loaded from: currently support "JHU"
and "HealthData
".
vector of valid location code. The US hub is using FIPS code and the ECDC hub is using country name abbreviation.
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.
string specifying temporal resolution
to include: one of 'daily'
or 'weekly'
date to include the last available truth point in 'yyyy-mm-dd'
format.
character, which hub to use. Default is "US"
, other option is
"ECDC"
a data.frame with columns location
, target_end_date
, target_variable
and value