This endpoint was previously deprecated and remains available for historical
reference. The underlying data source is no longer updated and no new data is
being ingested. For more details, refer to the "Endpoints kept for historical
reference" section of vignette("migration-guide"), and visit the V5 signals documentation.
API docs: https://cmu-delphi.github.io/delphi-epidata/api/covid_hosp.html.
Obtains the COVID-19 reported patient impact and hospital capacity data by state. This dataset is provided by the US Department of Health & Human Services.
Usage
pub_covid_hosp_state_timeseries(
states,
dates = "*",
...,
as_of = NULL,
issues = NULL,
fetch_args = fetch_args_list()
)Arguments
- states
character. Two-letter state abbreviations. See US states codes for details.
- dates
timeset. Dates to fetch. Supportsepirange()and defaults to all ("*") dates.- ...
not used for values, forces later arguments to bind by name
- as_of
Date. Optionally, the as-of date for the issues to fetch. See the "Data Versioning" section for details.
- issues
timeset. Optionally, the issue(s) of the data to fetch. See the "Data Versioning" section for details.- fetch_args
fetch_args_list(). Additional arguments to pass tofetch(). Seefetch_args_list()for details.
Data Versioning
Several endpoints support retrieving historical versions of the data. The following parameters control this and are mutually exclusive (only one can be provided at a time).
as_of: (Date) Retrieve the data as it was on this date.issues:timesetRetrieve data from a specific issue date or range of dates.lag: (integer) Retrieve data with a specific lag from its issue date.
If none of these is specified, the most recent version of the data is returned.
See vignette("versioned-data") for details and more ways to specify
versioned data.
See also
For example queries showing how to discover signals and build calls,
see vignette("signal-discovery", package = "epidatr").
Examples
pub_covid_hosp_state_timeseries(
states = "fl",
dates = epirange(20200101, 20200501)
)
#> `pub_covid_hosp_state_timeseries()` covers a data source that is no longer
#> updated.
#> ℹ Historical data remains available, but no new data is being ingested.
#> ℹ See the "Endpoints kept for historical reference" section of
#> `vignette("migration-guide")` (or
#> <https://cmu-delphi.github.io/epidatr/articles/migration-guide.html#endpoints-kept-for-historical-reference>)
#> for details.
#> This message is displayed once per session.
#> # A tibble: 51 × 118
#> state geocoded_state issue date critical_staffing_shortage_today…¹
#> <chr> <chr> <date> <date> <lgl>
#> 1 FL NA 2024-05-03 2020-03-12 FALSE
#> 2 FL NA 2024-05-03 2020-03-13 FALSE
#> 3 FL NA 2024-05-03 2020-03-14 FALSE
#> 4 FL NA 2024-05-03 2020-03-15 FALSE
#> 5 FL NA 2024-05-03 2020-03-16 FALSE
#> 6 FL NA 2024-05-03 2020-03-17 FALSE
#> 7 FL NA 2024-05-03 2020-03-18 FALSE
#> 8 FL NA 2024-05-03 2020-03-19 FALSE
#> 9 FL NA 2024-05-03 2020-03-20 FALSE
#> 10 FL NA 2024-05-03 2020-03-21 FALSE
#> # ℹ 41 more rows
#> # ℹ abbreviated name: ¹critical_staffing_shortage_today_yes
#> # ℹ 113 more variables: critical_staffing_shortage_today_no <lgl>,
#> # critical_staffing_shortage_today_not_reported <lgl>,
#> # critical_staffing_shortage_anticipated_within_week_yes <lgl>,
#> # critical_staffing_shortage_anticipated_within_week_no <lgl>,
#> # critical_staffing_shortage_anticipated_within_week_not_reported <lgl>, …