MBTA WAIT TRACKER

API INTEGRATION, DATA CLEANING, DATA VISUALIZATION

2025

hero-banner
INTRODUCTION

The MBTA Wait Tracker is a Blue Line project built to answer a simple commuter frustration: how long is the wait actually going to be, and is one direction worse than the other right now. The core challenge was the data itself. The MBTA API returns raw prediction times, but some trains come back with canceled, null, or undefined arrival times, so any average calculated straight from the feed would be skewed or just wrong.

DESIGNING METHOD

The MBTA API returns every scheduled train for a stop, but not every prediction has a usable arrival time, so I had to filter out None values before doing any math with them or the whole average would break.

The direction naming became its own problem. The API returns direction_id as 0 or 1, which internally I treated as uptown and downtown, but that mapping isn't intuitive to anyone reading the output, so I relabeled everything to inbound and outbound in the visuals while keeping the original terms in the code logic.

detail-image
detail-image
FINAL PERFORMANCE

Once the filtering was in place, the program ran end to end without breaking on canceled or missing predictions, pulling live data for every Blue Line stop and turning it into a summary, a bar graph, and an interactive map in one run. The bar graph made the inbound versus outbound gap immediately obvious at certain stations, and the map's popups let you check any single stop's average wait without digging through the raw dataframe. The biggest limitation was that the tool only reflects wait times at the exact moment it's run, so a station showing a short wait could still get hit with a delay minutes later that the model has no way to account for.

detail-image

//

SUMMARY

//

SUMMARY

//

1

GOALS

Build a tool that pulls live MBTA data and turns it into a clear, actionable summary of Blue Line wait times, comparing inbound and outbound trains at every station.

GOALS

Build a tool that pulls live MBTA data and turns it into a clear, actionable summary of Blue Line wait times, comparing inbound and outbound trains at every station.

2

TOOLS

TOOLS

3

ROLE

ROLE

4

CHALLENGES

CHALLENGES

5

RESULTS

RESULTS

PREVIOUS PROJECT

BACK TO ENGINEERING

NEXT PROJECT