Live Subway is a project to provide real-time visualization of the NYC subways, using the real-time MTA data feeds, written with Flask and Mapbox GL JS.
API endpoint: http://datamine.mta.info/files/[key]/gtfs
- Download: Google GTFS Realtime Proto
- Download: MTA Subway Proto (remove the
.txt
extension)
- Download:
protoc-[version]-[OS].zip
from the list of latest Protobuf releases. - go into
[unzipped_dir]/bin
- move protoc binary into $PATH
- run
protoc --python_path=[WORKING_DIRECTORY] gtfs-realtime.proto
- run
protoc --python_path=[WORKING_DIRECTORY] nyct-subway.proto
- create
API_KEY.py
add the linekey = APIKEY
- create a
static_transit
directory in root directory and add the static.txt
files there - run
python scripts/static_to_json.py
- run
python app.py
and point browser tolocalhost:5000
to test success