Description Usage Arguments Details Value Note
Uses the data source from the
CDC FluView
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.
1 2 3 4 5 6 | get_flu_data(
region = "hhs",
sub_region = 1:10,
data_source = "ilinet",
years = as.numeric(format(Sys.Date(), "%Y"))
)
|
region |
one of " |
sub_region |
depends on the |
data_source |
either of " |
years |
a vector of years to retrieve data for (i.e. |
A lookup table between HHS regions and their member states/territories
is provided in hhs_regions
.
If only a single data_source
is specified, then a single
data.frame
is returned, otherwise a named list with each
data.frame
is returned.
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.