pull_histTable: Pull down DHS COVID-19 Historical Data Table

Description Usage Arguments Value Examples

View source: R/data_pull_fcns.R

Description

This function uses the REST API to pull down the data that are currently posted at https://data.dhsgis.wi.gov/datasets/covid-19-historical-data-table/ using the GeoJSON REST API. Note: currently it does not pull down any geometry data used to produce maps.

Usage

1
pull_histTable(end_date = NULL)

Arguments

end_date

(default = NULL) If specified it is the end date of the time series that you wish to analyze. It should be something coercible to Date format with as.Date. If you want all data leave it blank.

Value

a cleaned version of the COVID-19 Historical Data Table including HERC regions with the following columns

fips

renamed from GEOID

geo_type

renamed from GEO

geo_name

renamed from NAME

post_date

DATE converted to Date format

case_daily

cleaned daily new positive cases from POS_NEW except for the first day which is from POSITIVE

test_daily

cleaned daily new total tests from TEST_NEW except for the first day which is from POSITIve + NEGATIVE

death_daily

cleaned daily new deaths from DTH_NEW except for the first day which is from DEATHS

pop_2018

2018 Population Numbers pulled from WISH

case_cum

daily cumulative positive cases calculated from case_daily

test_cum

daily cumulative total tests calculated from test_daily

death_cum

daily cumulative deaths calculated from death_daily

and likely one or more of the following columns if applicable

case_daily_raw

original daily new positive cases before cleaning

test_daily_raw

original daily new total tests before cleaning

death_daily_raw

cleaned daily new deaths before cleaning

Examples

1
2
3
4
5
#for all available data
hdt <- pull_histTable()

#for data through a certain date
hdt_old <- pull_histTable(end_date = "2020-06-17")

lcrayton18/State_package_burdenandtrajectory documentation built on July 19, 2020, 12:37 a.m.