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

Description Usage Arguments Details See Also Examples

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, type = "yellow", ...)

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

## S3 method for class 'etl_nyctaxi'
etl_transform(obj, years = as.numeric(format(Sys.Date(),
  "%Y")), months = 1:12, type = "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.

type

a character variable giving the type of data the user wants to download. There are four options: yellow (meaning yellow taxi data), green (meaning green taxi data), uber, and lyft. Users can only choose one transportation at a time. The default is yellow.

...

arguments passed to smart_download

Details

extract NYC Yellow taxi trip data from Jan 2009 to the most recent month, Green taxi trip data from Aug 2013 to the most recent month data from NYC Taxi & Limousine Commission, Uber trip data from April to September 2014 and January to June 2015, Lyft weekly-aggregated data from 2015 to the most recent week.

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 = 2014, months = 1:12, type = c("uber")) %>% 
   etl_transform(years = 2015, months = 1, type = c("green")) %>% 
   etl_load(years = 2015, months = 1, type = c("green")) 

## End(Not run)

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