Skip to content

Plot realtime positions of TransLink vehicles on a map (matplotlib + OSM)

Notifications You must be signed in to change notification settings

trishmapow/translink-gtfs-visualiser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Translink GTFS Realtime Map

screenshot of matplotlib window

Dependencies

pip3 install -r requirements.txt

  • matplotlib (main plotting lib)
  • requests
  • smopy (OSM tile downloads)
  • gtfs-realtime-bindings
  • protobuf3-to-dict

Usage

  1. Download GTFS static files (TransLink), unzip into SEQ_GTFS dir (configurable)
  2. Run python3 feedparser.py, will download and save OSM map to MAP_FILENAME for region defined in BBOX

Modifying for other feeds

  • Download correct GTFS static files
  • Edit FEED_URL in feedparser.py
  • Edit BBOX with coord bounds (LONG_MIN, LONG_MAX, LAT_MIN, LAT_MAX), useful tool: https://www.openstreetmap.org/export
  • Edit get_entity_type function to return correct vehicle i.e. bus/train/ferry/etc from the GTFS dataset. Otherwise simply replace with e.g. return 'buses' (all vehicles will be labelled as green dots)

About

Plot realtime positions of TransLink vehicles on a map (matplotlib + OSM)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages