Package 'covid19us'

Title: Cases of COVID-19 in the United States
Description: A wrapper around the 'COVID Tracking Project API' <https://covidtracking.com/api/> providing data on cases of COVID-19 in the US.
Authors: Amanda Dobbyn [aut, cre]
Maintainer: Amanda Dobbyn <[email protected]>
License: MIT + file LICENSE
Version: 0.1.9
Built: 2024-10-23 04:29:34 UTC
Source: https://github.com/aedobbyn/covid19us

Help Index


Get COVID-related information for certain counties

Description

Currently limited to the worst-affected counties in mostly Washington state, California, and New York.

Usage

get_counties_info()

Value

A tibble with one row per county and their COVID website information.

Examples

get_counties_info()

Get info about this dataset

Description

Get info about this dataset

Usage

get_info_covid19us()

Value

A tibble with information about where the data is pulled from, details about the dataset, what the data types are, etc.

Examples

get_info_covid19us()

Get current counts for every state

Description

Get current counts for every state

Usage

get_states_current()

Value

A tibble with one row per state and columns for individuals' COVID statuses (positive, negative, pending, death) and their total.

Examples

get_states_current()

Get daily counts for every state

Description

Daily counts are updated every day at 4pm EST. This is the only function that takes arguments.

Usage

get_states_daily(state = "all", date = "all")

Arguments

state

State abbreviation for a specific state or all states with "all".

date

For a specific date, a character or date vector of length 1 coercible to a date with lubridate::as_date().

Value

A tibble with one row per state for all dates available with columns for individuals' COVID statuses (positive, negative, pending, death) and their total.

Examples

get_states_daily()

get_states_daily("NY", "2020-03-17")
get_states_daily(state = "WA")
get_states_daily(date = "2020-03-11")

Get COVID-related information for each state

Description

Get COVID-related information for each state

Usage

get_states_info()

Value

A tibble with one row per state incluing information on the state's data_site where the data was pulled from and the covid_19_site where data is published.

Examples

get_states_info()

Get URLs and their details for each state

Description

Get URLs and their details for each state

Usage

get_tracker_urls()

Value

A tibble with one row for every state, the URL used by scrapers to get data, and a filter column that provices the xpath or CSS selector used by the COVID-19 Tracking Project's scraper to get this data.

Examples

get_tracker_urls()

Get current US counts

Description

Get current US counts

Usage

get_us_current()

Value

A tibble with one row for the current count of the country's COVID statuses.

Examples

get_us_current()

Get daily US counts

Description

Updated every day at 4pm.

Usage

get_us_daily()

Value

A tibble with one row per date in which data is available and counts for each of those states.

Examples

get_us_daily()

Get state data in long format

Description

Get state data in long format

Usage

refresh_covid19us(type = "daily")

Arguments

type

One of "daily" or "current"

Value

A tibble of data retrieved with get_states_daily or get_states_current in long format with a data_type and a value column.

Examples

refresh_covid19us()