Fetch confirmed US hospital admissions (COVID-19, influenza or RSV) from NHSN via pub_covidcast.
Arguments
- pathogen
One of "covid", "flu" or "rsv".
- geo_value
Geographic value(s) to fetch, as per pub_covidcast.
- revisions
Logical. If
TRUE, fetch the full revision history needed byget_ncast. DefaultFALSE(latest only).
Value
An incast_data object (see check_data).
Examples
get_data(pathogen = "covid", geo_value = "ny")
#> Warning: No API key found. You will be limited to non-complex queries and encounter rate
#> limits if you proceed.
#> ℹ See `?save_api_key()` for details on obtaining and setting API keys.
#> This warning is displayed once every 8 hours.
#> <incast_data>
#> Target: wk inc covid hosp
#> Series: 1 (location)
#> Window: 2020-08-08 to 2026-07-18 (7-day interval)
# Revision history for nowcasting
get_data(pathogen = "covid", geo_value = "ca", revisions = TRUE)
#> <incast_data>
#> Target: wk inc covid hosp
#> Series: 1 (location)
#> Window: 2020-08-08 to 2026-07-18 (7-day interval)
#> History: 2024-11-17 to 2026-07-19
