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.
 
 

36 lines
1.3 KiB

% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/cdcfluview.R
\name{get_flu_data}
\alias{get_flu_data}
\title{Retrieve CDC flu data}
\usage{
get_flu_data(region = "hhs", sub_region = 1:10, data_source = "ilinet",
years = 2014)
}
\arguments{
\item{region}{one of "\code{hhs}", "\code{census}", "\code{national}"}
\item{sub_region}{depends on the \code{region_type}.\cr
For "\code{national}", the \code{sub_region} should be \code{NA}.\cr
For "\code{hhs}", should be a vector between \code{1:10}.\cr
For "\code{census}", should be a vector between \code{1:9}}
\item{data_source}{either of "\code{who}" (for WHO NREVSS) or "\code{ilinet}" or "\code{all}" (for both)}
\item{years}{a vector of years to retrieve data for (i.e. \code{2014} for CDC flu seasn 2014-2015)}
}
\value{
If only a single \code{data_source} is specified, then a single \code{data.frame} is
returned, otherwise a named list with each \code{data.frame} is returned.
}
\description{
Uses the data source from the CDC FluView \url{http://gis.cdc.gov/grasp/fluview/fluportaldashboard.html}
and provides flu reporting data as either a single data frame or a list
of data frames (depending on whether either WHO NREVSS or ILINet - or both - is chosen)
}
\examples{
\dontrun{
flu <- get_flu_data("hhs", 1:10, c("who", "ilinet"), years=2000:2014)
}
}