Unfinished Projects: A Day on the Bus

03 April 2016

In 2010, the MBTA added GPS devices to their buses, and made the data available in real time.

I collected and stored a lot of this data, with plans to make some sort of useful app. That never happened, but it was good excuse to make some simple visualizations. I took a day’s worth (June 15th, 2010) of the data and used the canvas API to draw it with varying styles.

Try it here: http://static.ryanberdeen.com/projects/bus/viz-demo-0.1/play.html. Clicking on the canvas allows you to choose the style. This is the result of “cumulative”:

cumulative

The source is on GitHub: https://github.com/also/busviz

I’ve saved a couple of videos in case it ever stops working.

A full week of the data I started with is saved at http://static.ryanberdeen.com/projects/bus/data/vehicleLocations.csv (150 MB).

timestamp,id,routeTag,dirTag,lon,lat,secsSinceReport,heading,speedKmHr,predictable
1276573357828,"1117",null,null,-71.0644939,42.3318597,26,-4,0,false
1276573357828,"0699","23","out",-71.0807281,42.3055323,58,158,0,true
1276573357828,"6003","751","out",-71.0743703,42.338341,25,227,0,true
1276573357828,"0697","28","28_28_0063v0_1",-71.09268059999999,42.2672352,58,217,0,true

I’m not sure about the data quality. I made a heatmap of the position of the 77, and it seems to spend a lot of time off its route.

77 heatmap