etl_extract.etl_nyctaxi: Extract NYC Taxi Trip Data from data from NYC Taxi &...

Description Usage Arguments Details See Also Examples

View source: R/etl_extract.R

Description

Extract NYC Taxi Trip Data from data from NYC Taxi & Limousine Commission

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S3 method for class 'etl_nyctaxi'
etl_extract(obj, years = as.numeric(format(Sys.Date(),
  "%Y")), months = 1:12, types = "yellow", ...)

## S3 method for class 'etl_nyctaxi'
etl_load(obj, years = as.numeric(format(Sys.Date(),
  "%Y")), months = 1:12, types = "yellow", ...)

## S3 method for class 'etl_nyctaxi'
etl_transform(obj, years = as.numeric(format(Sys.Date(),
  "%Y")), months = 1:12, types = "yellow", ...)

Arguments

obj

an etl object

years

a numeric vector giving the years. The default is the most recent year.

months

a numeric vector giving the months. The default is January to December.

types

a character vector giving the type of taxi trip data of yellow

...

arguments passed to smart_download and/or green. The default is yellow.

Details

extract NYC Yellow taxi trip data from Jan 2009 and Green taxi trip data from Aug 2013 data from NYC Taxi & Limousine Commission

load NYC Yellow taxi trip data from load directory into a sql database, the default is a sqlite database and/or green. The default is yellow.

transform NYC Yellow taxi trip data from raw directory to load directory and/or green. The default is yellow.

See Also

etl_extract

etl_load

etl_transform

Examples

1
2
3
4
5
6
7
8
## Not run: 
taxi <- etl("nyctaxi", dir = "~/Desktop/nyctaxi/")
taxi %>% 
   etl_extract(years = 2016, months = 1:2, types = c("yellow","green")) %>% 
   etl_transform(years = 2016, months = 1:2, types = c("yellow","green")) %>% 
   etl_load(years = 2016, months = 1:2, types = c("yellow","green")) 

## End(Not run)

nyctaxi documentation built on Nov. 17, 2017, 3:59 a.m.