Exploring the MBTA’s realtime API – Part 1

I have been playing with Massachusetts Bay Transportation Authority (MBTA) Realtime API in recent weeks and ended up learning a lot about this transport agency which operates the largest fleet of public transport in New England area.
MBTA has a web based realtime API which can be used by developers who want to use the data to create new applications or just explore with the data.

Lots of the data provided comes with very little documentation in itself. Even when the documentation is provided it is pretty much lacking any context unless you read the blue book provided by MBTA. Here is a simple run-down of everything MBTA related, especially related to it’s subway system.

MBTA runs four rapid transit train lines, bus services, boats and commuter rails. All four of them are Electrical Multiple Units type of trains, with varying number of coaches per train. Out of four transit train lines, three of them are based on heavy rail system containing around 6 coaches per train with multiple doors on each coach. The Red Line train has 6 coaches, each coach contains 4 doors on each side of the coach. The Orange Line has 6 coaches and has 3 doors on each side of the coach. The Blue line has 6 coaches and has 2 doors on each side of the coach. The last line is Green Line which is actually a Street Car containing just two coaches and just one door on each side and might vary as there are multiple generation street cars serving the green line.

Blue line runs between Bowdoin in central Boston near Beacon Hill and ends at Wonderland in Revere. It is just one single line and does not split anywhere.

Red Line runs between Alewife at Somerville and runs south splitting near JFK/UMass where one section goes to Braintree and other goes to Ashmont.

The Orange Line runs between Oak Groke in North to Forest Hills in SouthWest.

The Green Line starts at Lechemere in Cambridge which is the Northern section and goes South till Boyslton Street, turns West and eventually splits into four sections are multiple stations. The four sections end at Boston College (B Line), Cleveland Circle (C Line), Riverside (D Line) and Heath Street (E Line). Even though there are four sections, not all trains run from each end to Lechemere. Some trains end way before the last stops on each section, not all trains from B, C, D or E Line go all the way upto Lechemere.

If you were confused by the above description, let me introduce you to the concept of “route”. A route is any two places where a service exists. Even in cases like Orange Line where there is no split of line, there can be theoretically more than one route. If there is a weekend service which travels from say Back Bay to Wellington station instead of going all the way till the ends of the line, that would count as another route on the same line.

We expect D line to go all the way from Riverside to Lechemere, but most of the D line trains end at Park Street instead of going ahead to Government Center, Haymarket, North Station, Science Park and eventually Lechemere. Infact many times MBTA serves a separate train between Haymarket and Lechemere. It’s like instead of having one route from stop 1 to 10, we have two routes on the same line from stop 1 to 6 and then from stop 8 to 10.

Next I would like to emphasise the difference between station and a stop. Take for example State Street station. Two lines – Orange and Blue Line have a stop in this station. Blue Line and Orange Line both end up having two stops each in station – one in each direction. Now let’s imagine theoretically, if Eastbound Blue line stops twice in the same station in two different parts of the station (if the station was huge), then Blue Line would have two stops in Eastbound direction with one stop in Westbound direction. That would make Blue Line have three stops in a station.
Not all the stops need to have a station associated with them. A bus stop at the corner of the street is not within a station. We can have more than one route crossing a stop is the most fundamental element. Stop can be associated with route and stop can be associated with a station. Thinking practically, a route cannot exist without stops and a station cannot exist without stops.

Advertisements