Learn R Programming

cdcfluview (version 0.4.0)

get_state_data: Retrieves state/territory-level influenza statistics from the CDC

Description

Uses the data source from the CDC' State-levelFluView http://gis.cdc.gov/grasp/fluview/main.html and provides state flu reporting data as a single data frame.

This function provides similar data to get_weekly_flu_report but provides more metadata about the reporting sources and has access to more historical infomation.

Usage

get_state_data(years = as.numeric(format(Sys.Date(), "%Y")))

Arguments

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 > 1997

Value

A data.frame of state-level data for the specified seasons (also classed as cdcstatedata)

Examples

Run this code
## Not run: 
# get_state_dat(2014)
# get_state_data(c(2013, 2014))
# get_state_data(2010:2014)
# httr::with_verbose(get_state_data(2009:2015))
# ## End(Not run)

Run the code above in your browser using DataLab