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.

41 lines
1.4 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. % Generated by roxygen2 (4.1.1): do not edit by hand
  2. % Please edit documentation in R/get_state_data.r
  3. \name{get_state_data}
  4. \alias{get_state_data}
  5. \title{Retrieves state/territory-level influenza statistics from the CDC}
  6. \usage{
  7. get_state_data(years = as.numeric(format(Sys.Date(), "\%Y")))
  8. }
  9. \arguments{
  10. \item{years}{a vector of years to retrieve data for (i.e. \code{2014} for CDC
  11. flu season 2014-2015). Default value is the current year and all
  12. \code{years} values should be > \code{1997}}
  13. }
  14. \value{
  15. A \code{data.frame} of state-level data for the specified seasons
  16. (also classed as \code{cdcstatedata})
  17. }
  18. \description{
  19. Uses the data source from the CDC' State-levelFluView
  20. \url{http://gis.cdc.gov/grasp/fluview/main.html} and provides state flu
  21. reporting data as a single data frame.\cr
  22. \cr
  23. This function provides similar data to \code{\link{get_weekly_flu_report}} but
  24. provides more metadata about the reporting sources and has access to more
  25. historical infomation.
  26. }
  27. \note{
  28. There is often a noticeable delay when making the API request to the CDC. This
  29. is not due to a large download size, but the time it takes for their
  30. servers to crunch the data. Wrap the function call in \code{httr::with_verbose}
  31. if you would like to see what's going on.
  32. }
  33. \examples{
  34. \dontrun{
  35. get_state_dat(2014)
  36. get_state_data(c(2013, 2014))
  37. get_state_data(2010:2014)
  38. httr::with_verbose(get_state_data(2009:2015))
  39. }
  40. }