Skip to contents

This function retrieves historical FluSurv-NET hospitalization data via the CDC FluView API.

Usage

get_cdc_hosp(years = NULL)

Arguments

years

A vector of years to retrieve data for (i.e. 2014 for CDC flu season 2014-2015). CDC has data going back to 2009 and up until the previous flu season. Default value (NULL) retrieves all years.

Value

A tibble with the following columns:

  • location: FIPS code for the location

  • abbreviation: Abbreviation for the location

  • region: Name of the region

  • epiyear: Year of reporting (in epidemiological week calendar)

  • epiweek: Week of reporting (in epidemiological week calendar)

  • week_start: Date of beginning (Sunday) of the given epidemiological week

  • week_end: Date of end (Saturday) of the given epidemiological week

  • rate: The cumulative rate per 100k

  • weekly_rate: The weekly rate per 100k

  • season: The flu season to which the given epidemiological week belongs

Examples

if (FALSE) { # \dontrun{
# Retrieve FluSurv-Net hospitalization data for specific year(s)
get_cdc_hosp(years=2019)
} # }