etl_extract.etl_nyc311: etl_extract

Description Usage Arguments Details Examples

Description

etl_extract

etl_load

etl_transform

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S3 method for class 'etl_nyc311'
etl_extract(obj, years = lubridate::year(Sys.Date()),
  months = lubridate::month(Sys.Date()), num_calls = 1e+06, ...)

## S3 method for class 'etl_nyc311'
etl_load(obj, years = lubridate::year(Sys.Date()),
  months = lubridate::month(Sys.Date()), ...)

## S3 method for class 'etl_nyc311'
etl_transform(obj, years = lubridate::year(Sys.Date()),
  months = lubridate::month(Sys.Date()), ...)

Arguments

obj

an etl object

years

years that the issues have been created (the most recent year is the default)

months

months that the issues have been created (the most recent month is the default)

num_calls

number of readings (1000000 is the default)

...

arguments passed to download.file. Set method as "curl" for Linux system, and as default for Windows and Mac OS X systems.

Details

This function downloads NYC311 data from NYC311 OPEN DATA website for years and months specified.

This function loads NYC311 data into a local database for years and months specified.

This function transforms NYC311 data for years and months specified.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
calls <- etl("nyc311")
calls %>%
 etl_extract(years = 2010:2011, months = 1:3, num_calls = 100)
 
calls %>%
  etl_init() %>%
  etl_update(years = 2010:2011, months = 1:3, num_calls = 100)

calls %>%
  tbl("calls") %>%
  glimpse()
  
calls_df <- calls %>%
  tbl("calls") %>%
  collect()

## End(Not run)

beanumber/nyc311 documentation built on May 12, 2019, 9:43 a.m.