get_zones_with_aggregate_tripdata: Returns zones data along with aggregate taxi trip data

Description Usage Arguments Value See Also Examples

Description

Reads the zones shapefile into SpatialPolygonsDataFrame, aggregates overall tip_fare ratio mean, and also for weekedays and weekends and return back the SpatialPolygonsDataFrame

Usage

1
get_zones_with_aggregate_tripdata(taxidata, zones_newyork)

Arguments

taxidata

The taxi trip data that were read from read_NYC_trip_dataset and preprocessed preprocess_dataset

zones_newyork

is the New York zones sf object, if not present will be downloaded from NYC website

Value

A SpatialPolygonsDataFrame with the zones features with the mean_tip_fair_ratio, mean_ratio_weekend and mean_ratio_weekday

See Also

read_NYC_trip_dataset and preprocess_dataset

Examples

1
2
3
4
5
6
## Not run: 
   url = "https://s3.amazonaws.com/nyc-tlc/trip+data/green_tripdata_2017-02.csv"
   taxidata = read_NYC_trip_dataset(url)
   get_zones_with_aggregate_tripdata(taxidata)

## End(Not run)

alaacs/nytaxi documentation built on May 9, 2019, 7:31 p.m.