AI Infrastructure · Full-Stack

Boston Logistics Simulator

Solo · 2026 · React, FastAPI, Python, XGBoost, Mapbox GL JS

Boston Logistics Simulator

Context

Boston has real grocery access gaps across neighborhoods. I wanted to model what happens to those gaps when stores close, roads get disrupted, or demand spikes — with enough precision to produce meaningful outputs. This simulator runs disruption scenarios on a live road network in real time.

What it does

Ingests Boston’s OpenStreetMap road network (11,400 nodes, 26,000 edges) and computes neighborhood access times as disruptions are applied. A Mapbox GL JS frontend renders live maps showing how access degrades by neighborhood. An XGBoost classifier predicts per-store restock risk with SHAP factor attribution surfaced in the UI. A facility siting algorithm recommends new store locations weighted by population and food insecurity index.

Technical decisions

Routing runs NetworkX Dijkstra on the full OSM graph with precomputed baseline isochrones per neighborhood. Disruptions recompute only affected subgraphs, keeping simulation response under 1.5 seconds without full graph re-traversal.

The XGBoost classifier was trained on synthetic labels generated from a deterministic scoring rule applied to USDA FARA and Census ACS data. AUC-ROC of 0.9982 reflects label recovery, not generalization — in production, labels would come from POS events. The pipeline is identical either way.

The backend is stateless: each POST to /simulate runs a full graph pass and returns a complete SimulationResponse. No WebSockets, no partial updates, no session state.

Stack

React 18, TypeScript, Mapbox GL JS, Zustand on the frontend. FastAPI, OSMnx, NetworkX, XGBoost, SHAP on the backend. Data from OpenStreetMap, USDA FARA, and Census ACS.

Outcome

A working simulator on real Boston geography with actionable outputs: access time by neighborhood, ranked store risk, and data-weighted location recommendations.