Real-time delay prediction for Atlanta's bus and rail network. Ingests the MARTA GTFS-realtime feed, trains XGBoost against historical patterns, serves a Mapbox dashboard that shows where the next bus really is, and when it really will arrive.
- Pulls vehicle positions and trip updates every 30 seconds from MARTA GTFS-realtime
- Joins against the static GTFS schedule to compute observed delays
- Serves a Mapbox dashboard showing live vehicles and per-stop delay predictions
- XGBoost model trained on 30 days of historical delays, retrained nightly
- Predictions update in under 500ms end-to-end
- Python 3.11, FastAPI (backend), Pydantic v2
- Supabase Postgres + PostGIS for spatial queries
- Supabase Edge Functions for GTFS ingestion (migrated off Railway)
- XGBoost for delay regression, features include hour-of-day, day-of-week, route, weather
- Mapbox GL JS for the dashboard
- Deployed on Cloud Run (backend) + Vercel (frontend)
See ARCHITECTURE_REVIEW.md for the full design rationale, including why PostGIS, why XGBoost over LSTM, and why Edge Functions over Railway.
git clone https://github.com/rmehta2500/marta
cd marta
cp .env.example .env
# add Supabase + MARTA API keys
uv sync
supabase start
make seed # 30 days of seeded historical delays
make ingest # start GTFS-realtime worker
make dev # start FastAPI + frontendWatch the 2-minute walkthrough
Live: marta.vercel.app
- MARTA GTFS-static: itsmarta.com/app-developer-resources
- MARTA GTFS-realtime: requires API key
Portfolio-quality. Predictions are calibrated against held-out test data; MAE is reported in the dashboard metrics panel.
MIT licensed.



