

Query Real-time SF Bus Locations With GeoFire 2.0 - mayop100
https://geofire.firebaseapp.com/sfVehicles/index.html

======
jacobawenger
Hey HN, I’m the author of GeoFire 2.0. We built GeoFire to provide Firebase
users with a client-side solution to querying geolocations in an efficient
manner. You can use it to store geolocation data about items (e.g. cars,
restaurants, hotel rooms) and then do location-based queries on that data in
realtime. The library is built entirely on top of Firebase and has no extra
server-side components. And its API will now feel right at home for anyone who
is familiar with the API for the Firebase web client. It is backed by a
comprehensive test suite and fixes some long-standing bugs in the original
implementation. I would love to hear and respond to any feedback or questions
you’ve got. And also to see what you create with it!

~~~
WalterSear
Where are you getting the location data for the buses from?

AFAICT, the location data coming from Muni isn't live. That, or there are
invisible buses roaming SF, that don't stop for me and teleport about.

~~~
mayop100
It's being populated from a Firebase Open Data Set:
[https://www.firebase.com/docs/data/index.html](https://www.firebase.com/docs/data/index.html)

The open data sets are in turn being populated by a script we (Firebase)
operates that pulls data from the NextBus API. It is live, real-time data,
though the API does have inaccurate data from time-to-time.

~~~
WalterSear
Thanks. Though if you are able to actually check the routes on the ground, I
believe that you will find that it's lying somewhere in SF, most of the time.

Why would something that was pulling data from buses only lie from time-to-
time? The answer is that it's not live, I'm afraid. It's freaking.

~~~
dsl
Lie is a strong word. What you are seeing likely the result of lost
connectivity to the bus, which NextBus compensates for with dead reckoning.
Busses also deviate from planned routes to deal with construction, head to
depots, or other random things.

~~~
WalterSear
That doesn't explain the ones that are continually leave the station, with the
prediction constantly resetting as the bus doesn't leave. Or the ones that
don't show up, and then the next one does, right on time.

If you don't know where something is, you don't know where it is. To give a
number anyway is disengenuous, and breaks trust. To do it all the time, and
call your data 'real-time' without caveat - lying may be a strong word for it,
but it's still appropriate.

~~~
thrownaway2424
NextBus always uses a straight-line estimate for the vehicle position within a
few stops from the terminal. This is based on the departure times in the Muni
published schedule. However, Muni operators and dispatchers do not adhere to
this schedule in any way, so the estimates that NextBus gives near the
beginning of Muni lines are pure fabrications. Lies, you might say.

------
thrownaway2424
-1 for mis-use of "Real-time". This appears to just be a visualization of NextBus data, which as we know is a pack of lies.

~~~
WalterSear
Someone has certainly taken umbrage at having this pointed out for them.

