Learn R Programming

cdcfluview (version 0.9.4)

get_hosp_data: Retrieves influenza hospitalization statistics from the CDC (deprecated)

Description

Uses the data source from the CDC FluView and provides influenza hospitalization reporting data as a data frame.

Usage

get_hosp_data(
  area = "flusurvnet",
  age_group = "overall",
  years = as.numeric(format(Sys.Date(), "%Y")) - 1
)

Arguments

area

one of "flusurvnet", "eip", "ihsp", or two digit state abbreviation for an individual site. Exceptions are New York - Albany ("nya") and New York - Rochester ("nyr")

age_group

a vector of age groups to pull data for. Possible values are: "overall", "0-4y", "5-17y, "18-49y, "50-64y, "65+y".

years

a vector of years to retrieve data for (i.e. 2014 for CDC flu season 2014-2015). Default value is the current year and all years values should be >= 2009

Value

A single data.frame.

Examples

Run this code
# NOT RUN {
# All of FluSurv-NET, 50-64 years old, 2010/11-2014/15 flu seasons
hosp <- get_hosp_data("flusurvnet", "50-64y", years=2010:2014)
# }

Run the code above in your browser using DataLab