get_us_regional_cases: Fetch daily COVID cases by state for United States of America

Description Usage Arguments Value Examples

View source: R/get_us_regional_cases.R

Description

Fetches daily COVID cases by state or county collated by the New York Times Data is available at https://github.com/nytimes/covid-19-data

Usage

1
get_us_regional_cases(level = "state", out = "timeseries")

Arguments

level

Character String specifying admin level "state", "county", default: "state".

out

Character String specifying output data format "timeseries", "total", default: "timeseries".

Value

A data.frame of COVID cases by region in the US

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
get_us_regional_cases(level = 'state', out = 'timeseries')

## Not run: 

 regions <- rnaturalearth::ne_states("United States of America", returnclass = "sf")

 cases <- get_us_regional_cases(out = 'total')

 regions %>% dplyr::filter(name %in% cases$state) %>%
 ggplot2::ggplot() + ggplot2::geom_sf()


## End(Not run)

epiforecasts/NCoVUtils documentation built on June 26, 2020, 1:20 a.m.