Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lzear/ubahnchen
Berlin subway map, animated
https://github.com/lzear/ubahnchen
berlin gtfs livemap metro network public-transit subway ubahn
Last synced: 4 days ago
JSON representation
Berlin subway map, animated
- Host: GitHub
- URL: https://github.com/lzear/ubahnchen
- Owner: lzear
- Created: 2022-08-29T23:46:18.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-20T19:19:26.000Z (23 days ago)
- Last Synced: 2024-10-20T23:51:45.272Z (23 days ago)
- Topics: berlin, gtfs, livemap, metro, network, public-transit, subway, ubahn
- Language: JavaScript
- Homepage: https://ubahnchen.vercel.app
- Size: 86.7 MB
- Stars: 90
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ubähnchen
**[ubähnchen.vercel.app](https://xn--ubhnchen-1za.vercel.app/)**
An animated live map of the Berlin U-Bahn.
## How it works
### Planned mode
Schedules are extracted from
the [GTFS data of the VBB](https://www.vbb.de/vbb-services/api-open-data/datensaetze/)
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.### Live mode (beta)
Mandatory stuff: "Powered by VBB GmbH. All information without guarantee."
The [HAFAS API](https://github.com/public-transport/hafas-client) 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.### Maps
The [U-Bahn](https://de.wikipedia.org/wiki/Datei:U-Bahn_Berlin_-_Netzplan.svg)
map
and [S-Bahn+U-Bahn](https://de.wikipedia.org/wiki/Datei:S-_und_U-Bahn-Linien_Berlin.svg)
maps ( [CC BY-SA 4.0](https://creativecommons.org/licenses/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.### Animation
The display and animations is made with [paperjs](http://paperjs.org/).
### Thanks
* [Jannis R](https://github.com/derhuerst) for his libraries and documentation that were very helpful to build this project.
* VBB for publishing the data and having APIs that are necessary for this project. And also for running the trains.## Development
### Setup
⚠️ 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:
* Download
the [files from VBB](https://www.vbb.de/vbb-services/api-open-data/datensaetze/)
in the `ubahnchen/GTFS` folder.
* Filter out transportation modes that are not in use yet (bus, tram,
boat...).
* Save all relevant values in a SQLite database
* Run the unit test. They validate the data.
* `yarn dev` in the ui package.### Things I like to look at in the future
* https://www.berlintransitmap.de/
* https://en.wikipedia.org/wiki/Berlin_U-BahnThe timezones are probably not handled properly. Please make sure you are
in `CET` before running `yarn build` 😄