Access data on the COVID-19 in the United States through the covid19us API.
The package covid19us
is an R wrapper around the COVID Tracking Project API. It provides updates on the spread of the virus in the US with a few simple functions.
This package gives access to US COVID-19 data. The function below allows you to download the data.
Each of these functions are detailed in this course and some examples are provided.
Get the most recent COVID-19 top-line data for the country:
library(coronavirus)
get_us_current()
Or the same by state:
get_states_current()
Daily state counts can be filtered by state and/or date:
get_states_daily(
state = "NY",
date = "2020-03-17"
)
All functions
get_counties_info
get_states_current
get_states_daily
get_states_info
get_tracker_urls
get_us_current
get_us_daily
Other details
library(coronavirus)
get_us_current()
get_states_current()
get_states_daily(
state = "NY",
date = "2020-03-17"
)
get_counties_info
get_states_current
get_states_daily
get_states_info
get_tracker_urls
get_us_current
get_us_daily
Command | Detail |
---|---|
get_us_current() | Get data for of all Corona Virus cases in the U.S. |
get_states_current() | Get data for of all Corona Virus cases in the U.S. state |
get_states_daily() | Get data for of all Corona Virus cases in the U.S. state and/or date |
This course uses the covid19us package, created by Amanda Dobbyn.
For attribution, please cite this work as
Warin (2020, March 2). Thierry Warin, PhD: [API] covid19us. Retrieved from https://warin.ca/posts/api-covid19us/
BibTeX citation
@misc{warin2020[api], author = {Warin, Thierry}, title = {Thierry Warin, PhD: [API] covid19us}, url = {https://warin.ca/posts/api-covid19us/}, year = {2020} }