https://github.com/derhuerst/vbb-routing
[work in progress] – Compute journeys based on the VBB GTFS data.
https://github.com/derhuerst/vbb-routing
gtfs public-transport routing transit
Last synced: 4 months ago
JSON representation
[work in progress] – Compute journeys based on the VBB GTFS data.
- Host: GitHub
- URL: https://github.com/derhuerst/vbb-routing
- Owner: derhuerst
- License: isc
- Created: 2018-02-16T01:18:39.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-06-30T00:43:17.000Z (about 3 years ago)
- Last Synced: 2025-01-07T19:12:17.291Z (6 months ago)
- Topics: gtfs, public-transport, routing, transit
- Language: JavaScript
- Homepage: https://github.com/derhuerst/vbb-routing#vbb-routing
- Size: 40 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# vbb-routing
**Compute [journeys](https://github.com/public-transport/friendly-public-transport-format/blob/1.0.1/spec/readme.md#journey) based on the [VBB GTFS data](https://github.com/derhuerst/vbb-gtfs.jannisr.de).**
[](https://www.npmjs.com/package/vbb-routing)
[](https://travis-ci.org/derhuerst/vbb-routing)

[](https://gitter.im/derhuerst)
[](https://patreon.com/derhuerst)## Installing
```shell
npm install vbb-routing
```## Usage
```js
todo
```## Segment model
Starting to walk the graph, our first segment looks like this:
```js
const first = {
// edge info
where: 'center', // arrival node
when: 1554307600, // start time
route: null, // we just started, so no route ID
duration: 0, // we just started, so edge duration// current state
transfers: 0,
blacklist: ['center'], // node we don't want to visit again
previousSegment: null
}
```A follow-up segment (the result of a single edge in the graph) may then look like this:
```js
const second = {
// edge info
where: 'lake',
when: 1554308040 + 360, // arrival time
route: 'B',
duration: 360,// current state
transfers: first.transfers + 0,
blacklist: first.blacklist.concat('lake'),
previousSegment: first
}
```## Contributing
If you have a question or have difficulties using `vbb-routing`, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to [the issues page](https://github.com/derhuerst/vbb-routing/issues).