

How Fucked is Muni - HaloZero
http://howfuckedismuni.com/

======
skimbrel
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/>), 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!

~~~
mikeyk
Thanks 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
Hmm, 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.

------
cageface
This is one of the rare cases where I think sparklines might add a lot to the
user experience. A sea of informationless icons doesn't invite me in.

------
zasz
I clicked around on seven lines or so, and got "0 out of 0 vehicles delayed,
are you sure this line is even running?" several times.

~~~
skimbrel
Heh. Yeah, that's because a good portion of all the lines listed are rush-
hour-only express variants of the main lines, or late-hours skeleton service
(for the lettered LRV routes). I'm working on adding information on when each
line is scheduled to run and what its expected headway is, so look for the
inactive lines to disappear and for info on those that are running to get more
accurate!

------
crikli
I had no clue what "Muni" was Googling led me to the San Francisco Municipal
Transportation Authority.

Most of the routes referenced are here:
<http://www.sfmta.com/cms/asystem/routelist.php>

~~~
kbob
I'd guessed either New York or London.

------
ghouse
Love the simple interface. I have been giving a site like this thought for the
past six months. I like that you haven't focused on "is it on schedule" but
more "how long am I going to wait" I would love a distribution of the space
between busses and trains at specific stops. For example, for the N line, at
Cole & Carl, show me the frequency distribution of time between trains (and
include an indication of what it's supposed to be). When three appear all
within 5 minutes, I know someone is in for a very long wait.

~~~
skimbrel
Another great suggestion! I've added all of these as issues in github, so as I
have free time I'll start building out more features.

------
jgv
This is rad. Anyone on here see "Is the L Train Fucked"
(<http://istheltrainfucked.com>)? I hacked that together a month or two ago. I
hope we start to see more apps built on public transpo APIs!

edit: also on github --> <http://github.com/jgv/is-the-l-train-fucked>

~~~
skimbrel
Awesome. Your site was my inspiration!

~~~
jgv
Cool! Would love to see sites using transit APIs spread to other cities.

------
ajays
Is it possible to get the positions of all the vehicles in 1 shot? I would
hate to hit the API for each vehicle, in every route.

~~~
enf
Yes, if you make the vehicleLocations request without specifying a route
([http://webservices.nextbus.com/service/publicXMLFeed?command...](http://webservices.nextbus.com/service/publicXMLFeed?command=vehicleLocations&a=sf-
muni&t=0)) you get the locations of all the vehicles at once.

------
thuddwhirr
Nice. Any plans to expose this via an api?

------
pwenzel
Wait wait, your transit operator has an API? How fucked is that?

~~~
city41
If by fucked you mean fucking cool, then very.

~~~
pwenzel
(Indeed, I meant surprisingly cool)

