Open data · A small everyday tool
Next stop.
A few nearby stops. The next buses. One view of the neighborhood, or a card for every stop.
First live provider: MBTA buses in Greater Boston. Start at Harvard Square, choose another area, or use your location. This version does not yet have Eugene/LTD arrivals.
Read the estimate, not a promise.
Each card identifies the bus route and destination. Most times are live predictions. A schedule-based estimate is labeled separately; it may be adjusted using historical travel times, without a current vehicle prediction. Cancelled trips and skipped stops are labeled, and arrival-only trips are not presented as departures you can board.
A missing prediction does not mean a stop has no service. Times become stale after two minutes without a successful retrieval; use Refresh arrivals or the official stop link. This example does not include every service alert or replace the agency’s trip planner. The recorded example is a dated snapshot, never a substitute for live travel information.
Location is a choice.
“Use my location” asks your browser for permission. Coordinates stay in this tab and are compared with the stop directory on your device. If permission is declined, lookup times out, or you are outside the supported area, you can choose a Boston area or search by stop name or ID. There is no automatic IP-location lookup and no saved location history.
The live directory and predictions come directly from MBTA. Requests for predictions identify the selected public stops, not your precise coordinates. OpenStreetMap supplies visible map tiles and receives your IP address and the map area requested. No map tiles are downloaded for offline use.
Three pieces, one explorer.
<transit-stop-card>displays one stop and its normalized arrivals, without fetching data itself.<transit-stop-map>plots stops, separates overlapping pins, and opens a card when a stop is selected.<transit-explorer>coordinates location, stop searches, feed requests, and the map/list switch.
All three use native Web Components and plain JavaScript. The map uses a small Web Mercator tile renderer; no mapping framework or account is required. The provider adapter is separate from the components so another agency can be added without rewriting the cards.
<script type="module"
src="/components/transit/explorer.js"></script>
<transit-explorer></transit-explorer>
This project revisits my interest in transit data from an earlier Uber take-home exercise; it is a new implementation prepared with AI assistance, not recovered source from that project.
Sources: MBTA V3 API documentation, MBTA developer resources, and OpenStreetMap tile policy. Map data © OpenStreetMap contributors. This is an independent project, not affiliated with MBTA or OpenStreetMap.