Fetch confirmed US hospital admissions from the NHSN source for COVID-19, influenza, or RSV using pub_covidcast.
Arguments
- pathogen
Character. One of "covid", "flu" or "rsv".
- geo_value
Character vector. Geographic value as per pub_covidcast to filter by.
- revisions
Logical. If
TRUE, fetches all available revision history, producing data ready forget_ncast. Default isFALSE(latest version only).
Value
An accidda_data object (see check_data).
Details
By default the latest version of each observation is returned. Set
revisions = TRUE to retrieve all available revision history,
which is needed by get_ncast.
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.
#> <accidda_data>
#>
#> Location: NY
#> Target: wk inc covid hosp
#> Window: 2020-08-08 to 2026-03-28 ( 295 dates )
#> History: FALSE
# Fetch revision history for nowcasting
get_data(pathogen = "covid", geo_value = "ca", revisions = TRUE)
#> <accidda_data>
#>
#> Location: CA
#> Target: wk inc covid hosp
#> Window: 2020-08-08 to 2026-03-28 ( 295 dates )
#> History: TRUE ( 2024-11-17 to 2026-03-29 )
