API: covid19us

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

Table of Contents


By using SKEMA Quantum Studio framework (Warin 2019), this course will teach you how to use the covid19us package.

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.


Warin, Thierry. 2019. “SKEMA Quantum Studio: A Technological Framework for Data Science in Higher Education.” https://doi.org/10.6084/m9.figshare.8204195.v2.

Citation

For attribution, please cite this work as

Warin (2020, March 2). Virtual Campus: API: covid19us. Retrieved from https://virtualcampus.skemagloballab.io/posts/api-covid19us/

BibTeX citation

@misc{warin2020api:,
  author = {Warin, Thierry},
  title = {Virtual Campus: API: covid19us},
  url = {https://virtualcampus.skemagloballab.io/posts/api-covid19us/},
  year = {2020}
}