Datasource
The historical Yellow Cab trip data can be downloaded from http://www.nyc.gov/html/tlc/html/about/trip_record_data.shtml. The data is present as CSV files with the following fields:
- VendorID
- Pickup Date Time
- Dropoff Date Time
- Passenger Count
- Trip Distance
- Pickup Longitude
- Pickup Latitude
- Rate Code ID
- Store and Forward flag
- Dropoff Longitude
- Dropoff Latitude
- Payment Type
- Fare Amount
- Extra Fee
- MTA Tax
- Improvement Surcharge
- Tip Amount
- Tolls Amount
- Total Payment
For the purpose of this example and to keep it simple, we are only looking at the Pickup Date Time, Pickup Longitude, Pickup Latitude, and Total Payment.
Also, the trip data file is not sorted, and you may see lines that can be up to 30 days ahead of the next entry.
Note
You can find the code for this example by going to the examples/nyctaxi
directory under the apex-malhar
GitHub repository, at the following link:Â https://github.com/apache/apex-malhar/tree/master/examples/nyctaxi.