How Fucked is Muni
howfuckedismuni.com
howfuckedismuni.com
For the curious:
The site is a very simple Dancer app running in Starman on an EC2 instance. The data comes from ProximoBus (http://proximobus.appspot.com/), a lightweight JSON-format wrapper for NextMuni's API.
Three things contribute to a route being "fucked": - Percentage of vehicles on the route marked as delayed by NextBus - Size of the smallest gap between vehicles running in the same direction ('bunching') - Size of the largest gap between vehicles running in the same direction (the other effect of bunching)
Code is up on github: https://github.com/skimbrel/how-fucked-is-muni Enjoy!
The main issue is that until I go through and rewrite the whole thing to do long-polling for every line, it's expensive to compute each route since I have to make several requests to ProximoBus to get all the necessary data. Caching for five minutes helps, but it's still less than ideal.
Most of the routes referenced are here: http://www.sfmta.com/cms/asystem/routelist.php
edit: also on github --> http://github.com/jgv/is-the-l-train-fucked