load_healthdata_data: Assemble a data frame of incident hospitalizations due to...

View source: R/healthdata_data.R

load_healthdata_dataR Documentation

Assemble a data frame of incident hospitalizations due to COVID-19 or influenza as they were available as of a specified issue date.

Description

Assemble a data frame of incident hospitalizations due to COVID-19 or influenza as they were available as of a specified issue date.

Usage

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
)

Arguments

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 TRUE. However, the default is FALSE so that the function maintains fidelity to the authoritative data source.

Value

data frame with columns location (fips code), date, inc, and cum all values of cum will currently be NA


reichlab/covidData documentation built on April 5, 2024, 5 p.m.