View source: R/healthdata_data.R
load_healthdata_data | R Documentation |
Assemble a data frame of incident hospitalizations due to COVID-19 or influenza as they were available as of a specified issue date.
load_healthdata_data(
issue_date = NULL,
as_of = NULL,
location_code = NULL,
spatial_resolution = "state",
temporal_resolution = "weekly",
measure = c("hospitalizations", "flu hospitalizations"),
replace_negatives = FALSE,
adjustment_cases = "none",
adjustment_method = "none",
geography = "US",
drop_last_date = FALSE
)
issue_date |
character issue date (i.e. report date) to use for constructing truths in format 'yyyy-mm-dd' |
location_code |
character vector of location codes. Default to NULL This should be a list of state FIPS code and/or 'US'. |
spatial_resolution |
character vector specifying spatial unit types to include: state' and/or 'national' This parameter will be ignored if location_code is provided. |
temporal_resolution |
character vector specifying temporal resolution to include: 'daily' or 'weekly' |
measure |
character vector specifying measure of disease prevalence: either 'hospitalizations' for COVID hospitalizations or 'flu hospitalizations' for hospitalizations with influenza |
replace_negatives |
boolean to replace negative incs with imputed data Currently only FALSE is supported |
adjustment_cases |
character vector specifying times and locations with reporting anomalies to adjust. Only the value "none" is currently supported |
adjustment_method |
string specifying how anomalies are adjusted. Only the value "none" is currently supported. |
geography |
character, which data to read. Only "US" is supported. |
drop_last_date |
boolean indicating whether to drop the last 1 day of
data for the influenza and COVID hospitalization signals. The last day of
data from the HHS data source is unreliable, so it is recommended to set this
to |
data frame with columns location (fips code), date, inc, and cum all values of cum will currently be NA
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.