[API] covid19us

API & Databases R Courses

Access data on the COVID-19 in the United States through the covid19us API.

Thierry Warin https://warin.ca/aboutme.html (HEC Montréal and CIRANO (Canada))https://www.hec.ca/en/profs/thierry.warin.html
03-02-2020

Database description

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.

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_us_current()

Get the most recent COVID-19 top-line data for the country:

library(coronavirus)

get_us_current()

get_states_current()

Or the same by state:

get_states_current()

get_states_daily()

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

tl;dr

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

Code learned this week

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

References

This course uses the covid19us package, created by Amanda Dobbyn.


Citation

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}
}