etl_transform.etl_covid: Transform COVID-19 Data to be Uploaded into PostgreSQL...

Description Usage Arguments Examples

View source: R/etl_transform.R

Description

etl_transform takes files saved in the raw folder from etl_extract and transforms them into usable datasets to be uploaded into a SQL database. After transformation, files are saved in the load folder within the specified directory or the temp directory if the user did not specify a directory. Under the hood, etl_transform cleans datasets by standardizing colummn names and removing unnecessary punctuation. Most importantly the function only selects relevant columns: admin, province/state, country/region, last_update, confirmed, deaths, and recovered. Arguments, such as month, day, and year let users transform data for a specified time period. When no arguments are specified then all data saved in the raw folder will be transformed and saved in the load folder.

Usage

1
2
## S3 method for class 'etl_covid'
etl_transform(obj, month, day, year, ...)

Arguments

obj

an etl object

month

numeric vector specifying month(s)

day

numeric vector specifying day(s)

year

numeric vector specifying year(s)

...

arguments passed to methods

Examples

1
2
3
4
5
6
7
covid_dat <- etl::etl("covid")
## Not run: 
covid_dat %>%
etl_extract() %>%
etl_transform(month = 4, day = c(1:15), year = 2020)

## End(Not run)

madisonvolpe/covid documentation built on May 15, 2020, 5:43 a.m.