{"id":15592121,"url":"https://github.com/derhuerst/discover-vbb-stations","last_synced_at":"2026-03-05T15:30:18.567Z","repository":{"id":57212839,"uuid":"100733107","full_name":"derhuerst/discover-vbb-stations","owner":"derhuerst","description":"Discover VBB stations by querying departures.","archived":false,"fork":false,"pushed_at":"2020-04-13T16:29:31.000Z","size":19,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-07T19:48:05.588Z","etag":null,"topics":["berlin","graph","public-transport","stations","transit","vbb"],"latest_commit_sha":null,"homepage":"https://github.com/derhuerst/discover-vbb-stations","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/derhuerst.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-18T16:57:06.000Z","updated_at":"2020-07-30T12:44:41.000Z","dependencies_parsed_at":"2022-09-12T11:12:30.848Z","dependency_job_id":null,"html_url":"https://github.com/derhuerst/discover-vbb-stations","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derhuerst%2Fdiscover-vbb-stations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derhuerst%2Fdiscover-vbb-stations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derhuerst%2Fdiscover-vbb-stations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derhuerst%2Fdiscover-vbb-stations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/derhuerst","download_url":"https://codeload.github.com/derhuerst/discover-vbb-stations/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239890293,"owners_count":19713945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["berlin","graph","public-transport","stations","transit","vbb"],"created_at":"2024-10-02T23:55:10.068Z","updated_at":"2026-03-05T15:30:18.496Z","avatar_url":"https://github.com/derhuerst.png","language":"JavaScript","funding_links":["https://patreon.com/derhuerst"],"categories":[],"sub_categories":[],"readme":"# discover-vbb-stations\n\n**Discover [VBB](https://en.wikipedia.org/wiki/Verkehrsverbund_Berlin-Brandenburg) stations by querying departures.** It tries to find all stations that all trains known by VBB stop at. Analogous to [`discover-db-stations`](https://github.com/derhuerst/discover-db-stations).\n\n[![npm version](https://img.shields.io/npm/v/discover-vbb-stations.svg)](https://www.npmjs.com/package/discover-vbb-stations)\n[![build status](https://img.shields.io/travis/derhuerst/discover-vbb-stations.svg)](https://travis-ci.org/derhuerst/discover-vbb-stations)\n![ISC-licensed](https://img.shields.io/github/license/derhuerst/discover-vbb-stations.svg)\n[![chat on gitter](https://badges.gitter.im/derhuerst.svg)](https://gitter.im/derhuerst)\n[![support me on Patreon](https://img.shields.io/badge/support%20me-on%20patreon-fa7664.svg)](https://patreon.com/derhuerst)\n\n\n## Installing\n\n```shell\nnpm install discover-vbb-stations\n```\n\n\n## Usage\n\n### using the command line\n\nUsing [npx](https://www.npmjs.com/package/npx):\n\n```shell\nnpx discover-vbb-stations [station-id] \u003estations.ndjson\n```\n\n### using JavaScript\n\n```js\nconst walk = require('discover-vbb-stations')\n\nwalk(stationId) // where to start\n.on('data', console.log)\n.on('error', console.error)\n```\n\n`walk()` returns a [readable stream](http://nodejs.org/api/stream.html#stream_class_stream_readable) [in object mode](https://nodejs.org/api/stream.html#stream_object_mode). It emits the following events:\n\n- `data`: a new station that has been discovered\n- `stats`: an object with the following keys:\n\t- `stations`: the number of stations discovered\n\t- `requests`: the number of requests sent\n\t- `queued`: the number of queued station IDs\n- `edge`: a connection between two stations, with the following keys:\n\t- `source`: a [*Friendly Public Transport Format* `1.0.1` `station` object](https://github.com/public-transport/friendly-public-transport-format/blob/1.0.1/spec/readme.md#station)\n\t- `target`: a [*Friendly Public Transport Format* `1.0.1` `station` object](https://github.com/public-transport/friendly-public-transport-format/blob/1.0.1/spec/readme.md#station)\n\t- `duration`: time to travel, in milliseconds\n\t- `line`: an [vbb-hafas `line` object](https://github.com/derhuerst/vbb-hafas/blob/master/docs/journeys.md#response)\n\n\n## API\n\n```js\nwalk(stationId, [opt])\n```\n\n`stationId` must be a string and a valid [IBNR](https://de.wikipedia.org/wiki/Internationale_Bahnhofsnummer).\n\n`opt` may have the following keys. It will be passed into [`queue()`](https://github.com/jessetane/queue#constructor).\n\n- `concurrency`: number of requests run in parallel – default: `2`\n- `timeout`: timeout for a single job in milliseconds – default: `10000`\n\n\n## Contributing\n\nIf you **have a question**, **found a bug** or want to **propose a feature**, have a look at [the issues page](https://github.com/derhuerst/discover-vbb-stations/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderhuerst%2Fdiscover-vbb-stations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderhuerst%2Fdiscover-vbb-stations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderhuerst%2Fdiscover-vbb-stations/lists"}