Berlin subway map, animated
An animated live map of the Berlin U-Bahn.
Schedules are extracted from
the GTFS data of the VBB
which contains
the arrival time
and departure time
for a time period of several months. The
movement of the train is simulated at constant speed between stations.
The GTFS data is currently manually updated, so it is constantly lagging a few days behind latess updates from VBB.
Mandatory stuff: "Powered by VBB GmbH. All information without guarantee."
The HAFAS API has a “radar”
endpoint, giving the position of all trains and some animation data, containing
stops information (origin, target, time) and a proc
value, which I think means "position between 2 stops in percent". So I'm using
that to place trains on the map.
Unfortunately, there are some implementation mistakes from me, causing trains to move weirdly or disappear.
The U-Bahn map and S-Bahn+U-Bahn maps ( CC BY-SA 4.0) are taken from Wikipedia and modified. In particular, the paths for the lines needed to be made continuous, instead of being many disjoint portions.
The display and animations is made with paperjs.
⚠️ Many steps are certainly missing. Please don't hesitate to open issues or PRs before you get frustrated with this.
yarn install
yarn build
in the gtfs-loader package. This should:
ubahnchen/GTFS
folder.yarn dev
in the ui package.The timezones are probably not handled properly. Please make sure you are
in CET
before running yarn build
😄