You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.6 KiB

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get-hosp-data.r
\title{Retrieves influenza hospitalization statistics from the CDC (deprecated)}
area = "flusurvnet",
age_group = "overall",
years = as.numeric(format(Sys.Date(), "\%Y")) - 1
\item{area}{one of "\code{flusurvnet}", "\code{eip}", "\code{ihsp}", or two
digit state abbreviation for an individual site. Exceptions are
New York - Albany ("\code{nya}") and New York - Rochester
\item{age_group}{a vector of age groups to pull data for. Possible values are:
"\code{overall}", "\code{0-4y}", "\code{5-17y}, "\code{18-49y},
"\code{50-64y}, "\code{65+y}".}
\item{years}{a vector of years to retrieve data for (i.e. \code{2014} for CDC
flu season 2014-2015). Default value is the current year and all
\code{years} values should be >= \code{2009}}
A single \code{data.frame}.
Uses the data source from the
\href{}{CDC FluView}
and provides influenza hospitalization reporting data as a data frame.
There is often a noticeable delay when making the API request to the CDC.
This is not due to a large download size, but the time it takes for their
servers to crunch the data. Wrap the function call in \code{httr::with_verbose}
if you would like to see what's going on.
# All of FluSurv-NET, 50-64 years old, 2010/11-2014/15 flu seasons
hosp <- get_hosp_data("flusurvnet", "50-64y", years=2010:2014)