Cal-Train and Bart Data

I’ve had TONS of request for Rideminder to include Cal-Train and Bart notifications. Since Firebase has deprecated their support for the real time transit data, I started to look for another data source.

So I’m doing research on playing with 511’s api, starting with their website. They have handy documentation that explains their api, but its not set up to where I can track the actual transit vehicle —

currently Rideminder is set up to find the closest transit vehicle and using Celery to checks the geolocation every minute and if the geolocation is within four blocks from the user’s destination.–

So I started playing with it to see what I can do with it. Its xml and I can get the following collects of data:

  • xml of all the transit agencies
  • xml of transit lines for a particular agency
  • xml of transit tops for a particular agency’s line
  • xml of transit lines and the time of the next a transit vehicle will come by for a particular transit stop of a particular transit line

I spent an afternoon playing around and parsed the s*** out of the xml.


Check out the code here

Since I’m getting different data, I have to re-think how I’m going to process it. Now that I do not have a time limit, I am toying with the idea of getting the data that is more on the permanent side (ie. agencies, routes, stops) since they don’t change often – maybe add it a task for celery to update every month. Especially since I’m re-doing parts of it, might as well re-do all the things! 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s