All case studies

Graduate project · Data engineering & ML

Ride fare prediction: a pipeline fast enough to use

693K Uber and Lyft price quotes from across Boston, and two jobs: build a pipeline fast enough to work with them, and predict what a ride will cost. The results were served through an interactive Flask dashboard.

Timeline
Dec 2024 – Apr 2025
Data
693K Uber & Lyft ride quotes, Boston
Stack
Google BigQuery, PySpark, SQL
Modeling & app
Python, XGBoost, Random Forest, Flask
4 min → 12 squery latency after optimizing with PySpark
$6.69mean absolute error (XGBoost)
$7.11MAE for the Random Forest baseline
690K+records in the BigQuery pipeline

The data

A public dataset of 693,071 ride price quotes from Uber and Lyft in Boston, collected between November 26 and December 18, 2018, alongside hourly weather readings for the same neighborhoods.

DimensionWhat's in it
ProvidersUber (385,663 quotes) and Lyft (307,408)
Ride types13, from shared rides (UberPool, Lyft Shared) to premium (Black SUV, Lux Black XL)
Locations12 Boston neighborhoods as pickup and drop-off points, including Back Bay, Fenway, the Financial District and Northeastern University
Trip featuresDistance (median 2.2 miles), surge multiplier, timestamp, source and destination
Weather6,276 hourly readings: temperature, rain, clouds, pressure, humidity and wind

Two quirks shape any model built on it. Every Uber Taxi quote (55,095 rows) comes without a price, and 97% of rides have no surge, so the surge pricing that riders notice most is rare in the data.

The pipeline

The data lived in Google BigQuery. At 690K+ records, the initial queries took more than four minutes.

Moving the heavy processing to PySpark brought query latency down from 4+ minutes to 12 seconds, which made fast iteration on features and models possible.

The models

I built and validated two models with feature engineering and cross-validation:

ModelMean absolute error
XGBoost (selected)$6.69
Random Forest$7.11

Serving it

Predictions were served through an interactive Flask dashboard, so fares and model outputs could be explored interactively.

This is my strongest data engineering work: cloud warehouse SQL, ETL, and performance tuning at scale.