3 ms·
Nice to see something of my own show up on HN. For the curious: The site is a very simple Dancer app running in Starman on an EC2 instance. The data comes fro
by skimbrel 16y ago
Nice to see something of my own show up on HN.
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/ 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 https://github.com/skimbrel/how-fucked-is-muni
Enjoy!
- mikeyk 16y agoThanks for this! My dream Muni app would show the average time it's currently taking to get through the Market underground section (where I see most of the bottlenecks, esp. on the N). This is a good proxy in the meantime :)
- skimbrel 16y agoHmm, that's not a bad metric. Maybe I can write up a special function for the metro lines that computes headways in the Market Street Subway and incorporates those into the status calculations. 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.
- anigbrowl 16y agoI've been meaning to do something like this for ages - well done. I didn't look at the source yet - I hope you're storing stats somewhere? I clicked on the L and my wife was skeptical, given the length of time it took her to get home. (The L seems particularly subject to bunching delays, by over-compensating line supervisors...it's common to walk the 1.5 miles home and pass 5, 6, 7 or even 8 trains coming in the opposite direction.)