createBiDatasets_WDS: Create Weekly Data Snapshot Data for Power Bi

View source: R/createBiDatasets_WDS.R

createBiDatasets_WDSR Documentation

Create Weekly Data Snapshot Data for Power Bi

Description

Given the base datasets, this function will do all the transformations and summarizations that are used to feed the data being displayed on the Weekly Data Snapshot

Usage

createBiDatasets_WDS(
  baseDataList = getBaseCovidData(),
  cutoffDay = c("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
    "Saturday"),
  lagDaysCDT = 10,
  lagDaysHosp = 2
)

Arguments

baseDataList

A named list of data.frames containing the base data. See details for more information. Defaults to the return from getBaseCovidData()

cutoffDay

A character day of the week. One of "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"

lagDaysCDT

Number of days to lag the Case, Death, Test data. Defaults to the value used by the Hub (10).

lagDaysHosp

Number of days to lag the Hospital data. Defaults to the value used by the Hub (2).

Details

baseDataList should contain a named list of the base data.frames. These are available through the MARC data API through the helpful functions downloadMARCCovidData() and downloadAllCovidAPIData(), but also must include the base summary datasets calculated from these. In total, this should include the 3 base data.frames and the 3 summary data.frames with the following names:

cdtData

Case, Death, and Test Data

cdtNRData

Newly Reported Case, Death, and Test Data

hospData

Hospital Data: modified by getBaseCovidData

cdtHospData

A joined version of cdtData and hospData

cdtHosp7DayRollingData

The 7 day rolling average of summary of cdtHospData

cdtHosp14DayRollingData

The 14 day rolling average of summary of cdtHospData


MARC-KC/Covid19MARCData documentation built on April 7, 2022, 11:43 a.m.