This dashboard displays the near real-time position of any bus, tram, or train (ATAC and Roma TPL operators) within the Metropolitan City of Rome Capital.
:trolleybus: Rome in Transit (GTFS-RT)

Description
This dashboard displays the near real-time position of any bus, tram, or train (ATAC and Roma TPL operators) within the Metropolitan City of Rome Capital. The stream layers automatically updates every 10 seconds through a periodic callback with new data retrieved from the GTFS-RealTime (Overview) feed provided and mantained by Roma Mobilità (website)
Hugging Face: https://huggingface.co/spaces/ivn888/Rome-in-transit
GitHub Pages: https://ivandorte.github.io/Rome-in-transit/gtfs-rt/app.html
Components
Two stream layers (maps):
- The "Vehicle status" map shows, as the name implies, the current status of the vehicle:
- The "Delays map" displays whether a vehicle is on time (ahead + on time) or behind schedule (late)
- :
N.B.: The value of the delay field (in minutes) will be zero if the vehicle is on time (A), negative if ahead of schedule (B) or positive if late (C).

Five number indicators showing:
- The number of currently active vehicles (fleet) divided between in transit or stopped;
- The number of vehicles on time or behind schedule;
Data
- Public transport data from Roma Mobilità;
- Administrative boundaries from ISTAT (2022);
ToDo
- [ ] Add alerts feed;
- [ ] Add routes, stops, etc...;
Known problems:
- If you view a blank page in HF restart the Space;
- The periodic callback may suddenly stop working (I don't know why) and the data will not be updated, simply refresh the application page;
Deployment on GitHub pages
- Loaded my custom Python modules from GitHub:
- Loaded protobuf and gtfs-realtime-bindings wheels from a CDN URL:
- gtfs-realtime-bindings (https://pypi.org/project/gtfs-realtime-bindings/#files) was compiled via: python setup.py bdist_wheel
- How I partially solved the CORS problem?
- Used XMLHttpRequest (js) to make HTTP requests of binary data;
https://github.com/ivandorte/Rome-in-transit/blob/52a790cecf2663c0289b3e54664a57c1ba3985c1/modulespyodide/romegtfs_rt.py#L51-L66
Deployment on HF
Just read this Medium article written by Sophia Yang, Ph.D.
References
- Dashboard logo from Material Symbols - Google
Authors
- Ivan D'Ortenzio