LoadData: LoadData

View source: R/LoadData.R

LoadDataR Documentation

LoadData

Description

General framework for loading and tidying data.

Usage

LoadData(
  functionNames = NULL,
  custom = FALSE,
  filepath = NULL,
  interactiveMode = interactive(),
  tidy = TRUE,
  DaysOld = 30,
  minimumpercapitaactivecases = 0,
  RiskEval = NULL,
  dropNACountry = TRUE,
  dropNAall = FALSE,
  verbose = TRUE
)

Arguments

functionNames

Name(s) of function representing that for loading data - options are in countrylist. Use NULL to attempt to download all available datasets.

custom

If TRUE, allows for use with functions not listed in object countrylist (experimental usage).

filepath

Optionally, provide a filepath to save an error csv file to.

interactiveMode

Set whether the session is being run interactively. If not and no googledrive oauth token is found, avoid data requiring googledrive auth token.

tidy

If TRUE, then perform tidying according to other parameters. If FALSE, then do nothing. (passed to tidy_Data).

DaysOld

Set any pInf data more than this days old to NA.(passed to tidy_Data).

minimumpercapitaactivecases

Set any pInf data less than this to NA.(passed to tidy_Data).

RiskEval

Set pInf to NA when risk is below RiskEval$minimumRisk (%) using RiskEval$ascertainmentbias and a maximum group size, RiskEval$maximumN (Note: this setting overwrites minimumpercapitaactivecases). (passed to tidy_Data).

dropNACountry

If TRUE, remove rows for countries whose pInf estimates all return NA.(passed to tidy_Data).

dropNAall

If TRUE, remove rows for any region whose pInf estimates all return NA. (passed to tidy_Data).

verbose

If TRUE, reports on loading progress and returns warnings/errors to console.

Value

A simple feature returning the date of most recent data (DateReport), a unique region code (geoid), the region name (RegionName) and country name (Country), the number of active cases per capita (pInf) and the regions geometry (geometry).

See Also

tidy_Data()

Examples

LoadData("LoadUS")
LoadData("LoadUS", dropNAall = TRUE)
LoadData("LoadNewZealand",tidy = FALSE)
LoadData(c("LoadUS","LoadMalaysia"))
## Not run: 
LoadData()

## End(Not run)

sjbeckett/subregionalcovid19 documentation built on Feb. 7, 2023, 6 a.m.