shape_case_data: Reshape confirmed case data for producing Tableau extracts

Description Usage Arguments Value Examples

View source: R/process_metrics.R

Description

take case data (from WEDSS or historical data table) and put it in proper shape for metric tables to feed tableau

Usage

1
shape_case_data(case_df)

Arguments

case_df

Confirmed case data.frame (e.g. produced by pull_histTable)

Value

a list of data.frames. The "summary" data.frame has one row per county, state, and HERC regions with the following columns

fips

FIPS Code and/or region identifier

geo_name

Name of geography

pop_2018

2018 Population Numbers pulled from WISH

case_weekly_1

Total cases for current 7 day period

case_weekly_2

Total cases for prior 7 day period

week_end_1

End date for current 7 day period

week_end_2

End date for prior 7 day period

and the "daily" data.frame has one row per county, state, and HERC region per day for the two week period with the following columns

fips

FIPS Code and/or region identifier

geo_name

Name of geography

post_date

Date cases were confirmed

case_daily

Count of cases confirmed that day

Examples

1
2
3
4
5
## Not run: 
  hdt <- pull_histTable()
  hdt_clean <- shape_case_data(hdt)

## End(Not run)

carlbfrederick/ohiCovidMetrics documentation built on Jan. 10, 2022, 12:20 p.m.