Taxi & ride-hail trips

NYC taxi and ride-hail trip records in Python: zones, fares, tips, speeds, airport trips, congestion pricing, and the fields that mislead.

One bar split into what card-paying New York taxi passengers paid in June 2025: the fare, the tip, the congestion surcharge, extras and smaller charges. a trip record is a receipt with a place on itfare65.4%tip14.4%congestion surcharge 7.5%extra 5.4%five smaller chargesCard trips, June 2025: the fare is 65.4% of what passengers paid, the tip 14.4%

New York's Taxi & Limousine Commission publishes every yellow-cab, green-cab and ride-hail trip as monthly Parquet files: pickup and drop-off time and taxi zone, distance, fare, surcharges and tip. A year of yellow cabs alone is 48.7 million rows, and the ride-hail file for a single month holds almost twenty million more. The records are a city-wide sensor for travel demand and traffic speed, and a receipt for every fare, which is what makes them worth learning to read carefully.

The guides here query the files with DuckDB, decode the fields, measure speeds and the busiest routes, compare congestion-zone speeds before and after January 2025, separate the airports, and set yellow cabs against Uber and Lyft. Three pages deal with the traps: cash trips that never record a tip, flex-fare rows with half their fields empty, and zone IDs that do not join to the map.

🧭 Start with the concepts

The ideas the how-to guides below assume you already have.

⚙️ Then do the task

Step-by-step walkthroughs with code you can copy and adapt.

🔧 When it breaks

The errors this topic produces, with the cause explained rather than just the command.

Related topics

Subjects that keep coming up alongside this one, most overlap first.

Keep browsing

Taxi & ride-hail trips sits in Analysis. Every topic on the site is listed on the topics index.