Description Usage Arguments Value Note Examples
View source: R/get-state-data.r
Uses the data source from the CDC' State-levelFluView
https://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.
1 | get_state_data(years = as.numeric(format(Sys.Date(), "%Y")))
|
years |
a vector of years to retrieve data for (i.e. |
A data.frame
of state-level data for the specified seasons
(also classed as cdcstatedata
)
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 httr::with_verbose
if you would like to see what's going on.
1 2 3 4 5 6 | state_data <- get_state_data(2014)
## Not run:
gsd <- get_state_data(c(2013, 2014))
gsd <- get_state_data(2010:2014)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.