MBTA Bus Plotter

September 23rd, 2010
mbta, mbtaplot, programming, python, tech, transport
I've been meaning to learn web programming, and I like transit, so I made a bus plotter for the mbta. This was mostly for learning, as you can already get most of this functionality elsewhere. For example, nextbus's webservice can show you the 77 bus with all it's current locations and so can I. One nice thing about writing my own, though, is that I can tweak features. I can turn off the bus display, plot multiple routes, and indicate bus frequency with shading. One thing I want to do is make it update the buses automatically (right now you need to click the routes to update bus locations, and you can only do it every 45 seconds), or even beter, update them with predicted locations based on where they were last time we heard from them and how long it's been since.

One thing this let me do it make a map that I've wanted for a while: bus frequency along boston area routes:

Routes with more buses are darker and fatter. (This doesn't correctly deal with routes that go along the same road, and shorter routes will appear to have less frequent service because they need fewer buses to get the same headways. I should probably replace this with something that looks at stop predictions and takes the longest expected time before the next bus arrives as an indication of how infrequent service is on that line.)

While I should warn you that this is very memory and processor intensive, you can generate this yourself if you'd like.

The code is all online at github under mbtaplot. The javascript is probably not very good; this is my first time writing in that language. If you're curious about the design you can read the readme.

Comment via: facebook

Recent posts on blogs I like:

Starting With Chords

A lot of people play fiddle. Basically nobody starts by learning chords before learning melodies. But that's actually how I learned. I started with chords. One of the nice things about learning to play violin this way is that you can go busking even…

via Anna Wise's Blog Posts November 15, 2024

Stuffies

I have some stuffies and I just have a bunny. Bunny is a rabbit. Woof is a seal. My favorite stuffie is bun bun. I play with my stuffies. Sometimes I jump up with them and I roll them. I can just throw them in the air when I want to play bthululubp wi…

via Nora Wise's Blog Posts November 15, 2024

You Can Buy A Malaria Net

2024 election takes

via Thing of Things November 6, 2024

more     (via openring)