gtfs_realtime_json

Standalone utility to convert gtfs-realtime feeds into simple JSON (and backward).

Download

Usage

$ gtfs_realtime_json <feed_url>

Examples:

$ gtfs_realtime_json "http://api.bart.gov/gtfsrt/tripupdate.aspx"
{"header":{"gtfs_realtime_version":"1.0","timestamp":1424843250, ... }

$ gtfs_realtime_json "http://api.bart.gov/gtfsrt/tripupdate.aspx" > output.json
// save JSON to output.json file

Sample JSON Outputs:

Converting a JSON to a protobuf file

First create a virtualenv:

$ mkvirtualenv gtfs_realtime_json
$ pip install -r requirements.txt

Then each time simply:

$ workon gtfs_realtime_json
$ ./json_gtfs_realtime.py file:gtfsrt.json gtfsrt.pb

GTFS-realtime Feed Sources

If you have any updates to this list, please message me or submit a PR!

Last Updated: 02-25-2015

Working Feeds:

Feeds Not Yet Confirmed:

Feeds Not Working:

Compiling

$ virtualenv .venv (optional)
$ pip install -r requirements.txt
$ ./pyinstaller.sh (See dist/gtfs_realtime_json)