This demo periodically polls GTFS-RT feed of Warsaw's public transport and visualizes map matched positions of vehicles on a map.
Prerequisites: osmium
, wget
and Docker.
./build.sh
- it prepares data and build required Docker imagesdocker compose up
- Open web browser and navigate to
http://127.0.0.1:8000/
- You should see something like this(vehicles positions are updated ~ every 10 seconds):
For basic understanding how this demo works look at this diagram:
sequenceDiagram
Browser->>Node: GET /
Node-->>Browser: index.html
loop Every second
Node->>GTFS-RT: Request
GTFS-RT-->>Node: Vehicle positions
Node->>Redis: Get map-matching states
Redis-->>Node: Map-matching states or null
Node->>Mama: Vehicle positions + Map-matching states
Mama-->>Node: Map matched locations + Map-matching states
Node->>Redis: Store map-matching states
Node->>Browser: Map matched locations
end