
Get COVID-19 Statistics for Specific US State(s)
Source:R/get_covid_stats_for_state.R
get_covid_stats_for_state.Rd
Retrieves real-time COVID-19 totals for one or more U.S. states from the 'disease.sh' API.
Arguments
- states
A character string with the name of a U.S. state or a comma-separated list of state names. Names must be spelled correctly.
- yesterday
Logical. If
TRUE
, returns data from the previous day. Default isFALSE
.- allowNull
Logical. If
TRUE
, missing values are returned asNA
instead of0
. Default isFALSE
.
Value
A data frame containing the following columns:
state
: State name.updated
: Last updated timestamp (converted to human-readable datetime in UTC).cases
: Total confirmed cases.todayCases
: New confirmed cases today.deaths
: Total deaths.todayDeaths
: New deaths today.population
: State population estimate.