data engineering · batch
NYC Taxi Pipeline
An end-to-end data pipeline over real New York yellow-cab trips: it downloads the public data, cleans and aggregates it with Spark, stores it in Parquet and MongoDB and produces an executive dashboard. One Docker command runs it all.
- ~12
- Parquet files per year (50–100 MB each)
- 8
- data-quality rules
- 6
- charts, including an executive dashboard

The problem
New York's Taxi & Limousine Commission (TLC) needs to understand demand, profitability and operations: which hours and zones concentrate trips, how revenue evolves and how passengers pay. The data exists, but it's millions of monthly records with errors.
Architecture
TLC (monthly Parquet) ─► ingesta.py ─► PySpark ─┬─► partitioned Parquet (year/month)
├─► MongoDB (aggregates)
└─► 6 charts + dashboardEach stage is an independent script orchestrated by run_pipeline.py. Docker Compose brings up Spark and MongoDB, so anyone can reproduce it exactly.
Technical decisions
- Batch, not streaming: the TLC publishes monthly historical data, not a live feed, and batch gives identical results on every run. With live GPS data, ingestion could be swapped for Kafka + Spark Structured Streaming without touching the rest.
- Data quality: drops fares outside $2.50–$500, distances outside 0.1–100 miles, passenger counts outside 1–6, trips over 4 hours, negative tips and trips that end before they start.
- Parquet + MongoDB: Parquet for the detail (columnar, partitioned) and MongoDB for the aggregates the charts query.
Result

The pipeline answers the business questions with aggregates by hour, day, month, zone and payment method. CI checks the code and builds the Docker image on every change.