Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/derhuerst/vbb-graph
Berlin & Brandenburg public transport as JSON graph.
https://github.com/derhuerst/vbb-graph
berlin graph json ndjson public-transport transit transport vbb
Last synced: 6 days ago
JSON representation
Berlin & Brandenburg public transport as JSON graph.
- Host: GitHub
- URL: https://github.com/derhuerst/vbb-graph
- Owner: derhuerst
- License: isc
- Created: 2017-06-03T12:39:03.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-08-01T02:31:25.000Z (over 3 years ago)
- Last Synced: 2024-10-03T23:56:11.481Z (about 1 month ago)
- Topics: berlin, graph, json, ndjson, public-transport, transit, transport, vbb
- Language: JavaScript
- Homepage: https://github.com/derhuerst/vbb-graph
- Size: 8.79 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# vbb-graph
**Berlin & Brandenburg public transport as JSON graph.** Generated using [`generate-vbb-graph`](https://github.com/derhuerst/generate-vbb-graph#generate-vbb-graph).
[![npm version](https://img.shields.io/npm/v/vbb-graph.svg)](https://www.npmjs.com/package/vbb-graph)
[![build status](https://img.shields.io/travis/derhuerst/vbb-graph.svg)](https://travis-ci.org/derhuerst/vbb-graph)
![ISC-licensed](https://img.shields.io/github/license/derhuerst/vbb-graph.svg)
[![chat on gitter](https://badges.gitter.im/derhuerst.svg)](https://gitter.im/derhuerst)## Installing
```shell
npm install vbb-graph
```## Usage
The npm package contains two files `nodes.ndjson` & `edges.ndjson`. As the readme of `generate-vbb-graph` explains:
> This tool generates data in the [JSON Graph Format](https://github.com/jsongraph/json-graph-specification/blob/master/README.rst#json-graph-specification). Note that instead of storing all nodes and edges in one JSON file, **it will create `nodes.ndjson` and `edges.ndjson`. These are [ndjson](http://ndjson.org)-encoded lists of all nodes and edges**, respectively.
```js
const ndjson = require('ndjson')fs.createReadStream(require.resolve('vbb-graph/nodes.ndjson'))
.pipe(ndjson.parse())
.on('error', console.error)
.on('data', console.log)
```## Contributing
If you have a question or have difficulties using `vbb-graph`, 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-graph/issues).