SORTA’s Real-time API Now Available for Developers

Yep. It’s finally here! :-D

Vehicle location feed:
http://developer.go-metro.com/TMGTFSRealTimeWebService/vehicle
Trip update feed:
http://developer.go-metro.com/TMGTFSRealTimeWebService/TripUpdate

The data is structured according to the GTFS real-time specification. I was able to parse it pretty easily in Python by following the instructions on that page. The fields currently included in the feed (many are optional in the specification) are as follows.

VehicleLocation feed sample data:

id: "4001"
vehicle {
  trip {
    trip_id: "940867"
  }
  position {
    latitude: 39.1043395996
    longitude: -84.3908996582
  }
  timestamp: 1421889007
  vehicle {
    label: "4001"
  }
}
...

TripUpdate feed sample data:

id: "938755"
trip_update {
  trip {
    trip_id: "938755"
    start_time: "17:07:00"
    start_date: "20150121"
    route_id: "1"
  }
  stop_time_update {
    stop_sequence: 5
    departure {
      delay: 60
      time: 1421878357
    }
    stop_id: "EZZJOHe"
  }
...
  stop_time_update {
    stop_sequence: 32
    arrival {
      delay: 60
      time: 1421880000
    }
    stop_id: "PAR2610e"
  }
  vehicle {
    label: "1001"
  }
}
...

The feeds update every 30 seconds, which seems a little slow, but oh well.

Right now, my understanding is that these feeds have been tentatively released as-is for developers only, and that SORTA is not ready yet to make a general public announcement that real-time data is available. Tim Harrington at SORTA, who shared the links with us, has politely asked to see the neat stuff that we’re able to develop with this data. I imagine that the sooner someone sends him a link to a decent, working app, the sooner they’ll give us the go-ahead and the sooner we’ll all be able to use this data in every-day situations.

So who’s gonna make an app? There must be a dozen open-source applications that are already designed to work with GTFS-realtime. We probably just need to plug this feed in and maybe make a few localization tweaks. If you or anyone you know has the skills and/or interest to make an app…then for the love of transit, let’s make this happen ASAP!

Posted in: Data | Events
Tags: | | |

Comments

Leave a Comment