
Uses the data source from the CDC FluView and provides influenza hospitalization reporting data as a data frame.
get_hosp_data(
area = "flusurvnet",
age_group = "overall",
years = as.numeric(format(Sys.Date(), "%Y")) - 1
)
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
")
a vector of age groups to pull data for. Possible values are:
"overall
", "0-4y
", "5-17y
, "18-49y
,
"50-64y
, "65+y
".
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
A single data.frame
.
# 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