Package nyctaxi. October 26, 2017

Similar documents
Package cattonum. R topics documented: May 2, Type Package Version Title Encode Categorical Features

Dhavide Aruliah Director of Training, Anaconda

Package jpmesh. December 4, 2017

Package fastdummies. January 8, 2018

Package dbx. July 5, 2018

Package geojsonsf. R topics documented: January 11, Type Package Title GeoJSON to Simple Feature Converter Version 1.3.

Package messaging. May 27, 2018

Package ECctmc. May 1, 2018

Package robotstxt. November 12, 2017

Package tidytransit. March 4, 2019

Package validara. October 19, 2017

Package censusr. R topics documented: June 14, Type Package Title Collect Data from the Census API Version 0.0.

Package bisect. April 16, 2018

Package calpassapi. August 25, 2018

Package gtrendsr. October 19, 2017

Package internetarchive

Package postgistools

Package docxtools. July 6, 2018

Package facerec. May 14, 2018

Package opencage. January 16, 2018

Package fitbitscraper

Package nlgeocoder. October 8, 2018

Package canvasxpress

Package IATScore. January 10, 2018

Package SEMrushR. November 3, 2018

Package qualmap. R topics documented: September 12, Type Package

Package knitrprogressbar

Package datasets.load

Package nngeo. September 29, 2018

Package bikedata. April 27, 2018

Package gtrendsr. August 4, 2018

Package TrafficBDE. March 1, 2018

Package rbgm. May 18, 2018

Package splithalf. March 17, 2018

Package lumberjack. R topics documented: July 20, 2018

Package labelvector. July 28, 2018

Package rcv. August 11, 2017

Package condusco. November 8, 2017

Package editdata. October 7, 2017

Package rsppfp. November 20, 2018

Package GetITRData. October 22, 2017

Package WordR. September 7, 2017

Package data.world. April 5, 2018

Package RODBCext. July 31, 2017

Package oec. R topics documented: May 11, Type Package

Package dkanr. July 12, 2018

Package tidyimpute. March 5, 2018

Package statsdk. September 30, 2017

Package mdftracks. February 6, 2017

Package rprojroot. January 3, Title Finding Files in Project Subdirectories Version 1.3-2

Package barcoder. October 26, 2018

Package kirby21.base

Package phrasemachine

Package censusapi. August 19, 2018

Package rgho. R topics documented: January 18, 2017

Package rmapzen. October 7, 2018

Package reval. May 26, 2015

Package githubinstall

Package states. May 4, 2018

Package IsoCorrectoR. R topics documented:

Package shinyfeedback

Package QCAtools. January 3, 2017

Package sqliter. August 29, 2016

Package postal. July 27, 2018

Package taxizedb. June 21, 2017

Package humanize. R topics documented: April 4, Version Title Create Values for Human Consumption

Package rzeit2. January 7, 2019

Package crossword.r. January 19, 2018

Package cregulome. September 13, 2018

Package gggenes. R topics documented: November 7, Title Draw Gene Arrow Maps in 'ggplot2' Version 0.3.2

Package NFP. November 21, 2016

Package leaflet.minicharts

Package auctestr. November 13, 2017

Package jstree. October 24, 2017

Package ezknitr. September 16, 2016

Package smapr. October 20, 2017

Package skynet. December 12, 2018

Package profvis. R topics documented:

Package pdfsearch. July 10, 2018

Package climber. R topics documented:

Package driftr. June 14, 2018

Package infer. July 11, Type Package Title Tidy Statistical Inference Version 0.3.0

Package comparedf. February 11, 2019

Package weco. May 4, 2018

Package goodpractice

Package virustotal. May 1, 2017

Package rwars. January 14, 2017

Package queuecomputer

Package snplist. December 11, 2017

Package areal. December 31, 2018

Package sfdct. August 29, 2017

Package readxl. April 18, 2017

Package RPresto. July 13, 2017

Package tidytree. June 13, 2018

Package darksky. September 20, 2017

Package jdx. R topics documented: January 9, Type Package Title 'Java' Data Exchange for 'R' and 'rjava'

Package loggit. April 9, 2018

Package strat. November 23, 2016

Package textrecipes. December 18, 2018

Package edfreader. R topics documented: May 21, 2017

Transcription:

Title Accessing New York City Taxi Data Version 0.0.1 Date 2017-10-24 Package nyctaxi October 26, 2017 Description New York City's Taxi and Limousine Commission (TLC) Trip Data <http://www.nyc.gov/html/tlc/html/about/trip_record_data.shtml> is a collection of green and yellow taxi trip data. The data was collected and provided by technology providers under the Taxicab & Livery Passenger Enhancement Programs <http://www.nyc.gov/html/tlc/html/industry/shl.shtml>. This package helps users to download New York City Trip Data. Depends R (>= 3.2.3), etl Imports DBI, dplyr, rlang, stringr License CC0 LazyData true RoxygenNote 6.0.1 Suggests dbplyr, testthat, knitr, lubridate, leaflet, rmarkdown, RSQLite VignetteBuilder knitr NeedsCompilation no Author Ben Baumer [aut], Wencong Priscilla Li [aut, cre], Trang Le [aut] Maintainer Wencong Priscilla Li <liwencong1995@gmail.com> Repository CRAN Date/Publication 2017-10-26 08:23:57 UTC R topics documented: etl_extract.etl_nyctaxi.................................... 2 get_file_path........................................ 3 green_2016_01_sample................................... 4 1

2 etl_extract.etl_nyctaxi Index 6 etl_extract.etl_nyctaxi Extract NYC Taxi Trip Data from data from NYC Taxi & Limousine Commission Description Extract NYC Taxi Trip Data from data from NYC Taxi & Limousine Commission Usage ## 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 Details years months types an etl object a numeric vector giving the years. The default is the most recent year. a numeric vector giving the months. The default is January to December. a character vector giving the type of taxi trip data of yellow... arguments passed to smart_download and/or green. The default is yellow. 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

get_file_path 3 Examples ## 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) get_file_path Utility function that generates file paths Description Take in arguments common to all three functions (e.g. years, months, types) as well as the stem of the URL and return the matched file paths. Usage get_file_path(years, months, types, path) Arguments years months types path a numeric vector giving the years. The default is the most recent year. a numeric vector giving the months. The default is January to December. a character vector giving the type of taxi trip data of yellow path to desired file Examples get_file_path(2017, 1:6, "yellow", "~/")

4 green_2016_01_sample green_2016_01_sample NYC Taxi trip data from NYC s Taxi and Limousine Commission (TLC) Description Random samples of 1000 observations generated by the sample function from the 2016 January green and yellow taxi trip data. Usage green_2016_01_sample yellow_2016_01_sample Format For both, a dataframe (tbl_df) each with 1,000 rows and 21 or 19 variables. The following variables are values that are found in either the green_2016_01_sample or yellow_2016_01_sample data tables. VendorID A code indicating the LPEP provider that provided the record.1= Creative Mobile Technologies, LLC; 2= VeriFone Inc. lpep_pickup_datetime The date and time when the meter was engaged. lpep_dropoff_datetime The date and time when the meter was disengaged. lpep_pickup_datetime Taxi pickup date and time lpep_dropoff_datetime Taxi dropoff date and time Store_and_fwd_flag This flag indicates whether the trip record was held in vehicle memory before sending to the vendor, aka "store and forward," because the vehicle did not have a connection to the server. Y= store and forward trip, N= not a store and forward trip RareCodeID The final rate code in effect at the end of the trip. 1= Standard rate, 2=JFK, 3=Newark, 4=Nassau or Westchester, 5=Negotiated fare, 6=Group ride Pickup_longitude Longitude where the meter was engaged. Pickup_latitude Latitude where the meter was engaged. Dropoff_longtitude Longitude where the meter was timed off. Dropoff_latitude Latitude where the meter was timed off. Passenger_count The number of passengers in the vehicle. This is a driver-entered value. Trip_distance The elapsed trip distance in miles reported by the taximeter. Fare_amount The time-and-distance fare calculated by the meter. Extra Miscellaneous extras and surcharges. Currently, this only includes the $0.50 and $1 rush hour and overnight charges. MTA_tax $0.50 MTA tax that is automatically triggered based on the metered rate in use.

green_2016_01_sample 5 Details Tip_amount Tip amount - This field is automatically populated for credit card tips. Cash tips are not included. Tolls_amount Total amount of all tolls paid in trip. Ehail_fee The description of this variable is not available on TLC website. improvement_surcharge $0.30 improvement surcharge assessed on hailed trips at the flag drop. The improvement surcharge began being levied in 2015. Total amount The total amount charged to passengers. Does not include cash tips. Payment_type A numeric code signifying how the passenger paid for the trip. 1= Credit card, 2= Cash, 3= No charge, 4= Dispute, 5= Unknown, 6= Voided trip Trip_type A code indicating whether the trip was a street-hail or a dispatch that is automatically assigned based on the metered rate in use but can be altered by the driver. 1= Street-hail, 2= Dispatch NYC s Taxi and Limousine Commission (TLC) Trip Data is a collection of trip records including fields capturing pick-up and drop-off locations, times, trip distances, fares, rate types, and driverreported passenger counts. The data was collected and provided to the NYC TLC by technology providers under the Taxicab & Livery Passenger Enhancement Programs. Author(s) Source Wencong (Priscilla) Li These data are recorded at http://www.nyc.gov/html/tlc/html/about/trip_record_data. shtml References The description of the data is available on http://www.nyc.gov/html/tlc/html/about/trip_ record_data.shtml Examples ## Not run: #' # if (require(dplyr) & require(ggplot2)) { green_2016_01_sample %>% filter(trip_distance <= 1) %>% ggplot(aes(x = Dropoff_longtitude, y = Pickup_latitude)) } ## End(Not run)

Index Topic datasets green_2016_01_sample, 4 etl_extract, 2 etl_extract.etl_nyctaxi, 2 etl_load, 2 etl_load.etl_nyctaxi (etl_extract.etl_nyctaxi), 2 etl_transform, 2 etl_transform.etl_nyctaxi (etl_extract.etl_nyctaxi), 2 get_file_path, 3 green_2016_01_sample, 4 sample, 4 smart_download, 2 tbl_df, 4 yellow_2016_01_sample (green_2016_01_sample), 4 6