{"id":13630354,"url":"https://github.com/derhuerst/vbb-stations","last_synced_at":"2025-04-15T05:05:25.635Z","repository":{"id":57141646,"uuid":"55312245","full_name":"derhuerst/vbb-stations","owner":"derhuerst","description":"A list of VBB stations.","archived":false,"fork":false,"pushed_at":"2024-09-20T16:17:37.000Z","size":368,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-25T00:30:13.316Z","etag":null,"topics":["berlin","bvg","public-transport","transit","transport","vbb"],"latest_commit_sha":null,"homepage":"https://github.com/derhuerst/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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-02T19:24:23.000Z","updated_at":"2024-09-20T16:17:41.000Z","dependencies_parsed_at":"2024-06-19T05:14:04.762Z","dependency_job_id":"d380637a-d44a-4f58-bafa-54fc5b708956","html_url":"https://github.com/derhuerst/vbb-stations","commit_stats":{"total_commits":101,"total_committers":3,"mean_commits":"33.666666666666664","dds":0.07920792079207917,"last_synced_commit":"ca9d0cdf425fbbb583cd6b3f4b2632a23809207e"},"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derhuerst%2Fvbb-stations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derhuerst%2Fvbb-stations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derhuerst%2Fvbb-stations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derhuerst%2Fvbb-stations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/derhuerst","download_url":"https://codeload.github.com/derhuerst/vbb-stations/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232925609,"owners_count":18597706,"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","bvg","public-transport","transit","transport","vbb"],"created_at":"2024-08-01T22:01:39.813Z","updated_at":"2025-01-07T19:30:17.478Z","avatar_url":"https://github.com/derhuerst.png","language":"JavaScript","funding_links":["https://github.com/sponsors/derhuerst"],"categories":["JavaScript"],"sub_categories":[],"readme":"# vbb-stations 🚏\n\nA **collection of all stations of the [Berlin Brandenburg public transport service (VBB)](http://www.vbb.de/)**, computed from [open](https://daten.berlin.de/datensaetze/vbb-fahrplandaten-gtfs) [GTFS](https://developers.google.com/transit/gtfs/) [data](https://vbb-gtfs.jannisr.de/).\n\n[![npm version](https://img.shields.io/npm/v/vbb-stations.svg)](https://www.npmjs.com/package/vbb-stations)\n![ISC-licensed](https://img.shields.io/github/license/derhuerst/vbb-stations.svg)\n[![support me via GitHub Sponsors](https://img.shields.io/badge/support%20me-donate-fa7664.svg)](https://github.com/sponsors/derhuerst)\n[![chat with me on Twitter](https://img.shields.io/badge/chat%20with%20me-on%20Twitter-1da1f2.svg)](https://twitter.com/derhuerst)\n\n\n## Installing\n\n```shell\nnpm install vbb-stations\n```\n\n\n## Usage\n\nThe [npm package](https://npmjs.com/vbb-stations) contains [*Friendly Public Transport Format* 1.2.1](https://github.com/public-transport/friendly-public-transport-format/blob/1.2.1/spec/readme.md) `station`s and `stop`s. `weight` is the sum of all arrivals \u0026 departures at a station, weighted by mode of transport.\n\n```js\n[\n\t{\n\t\ttype: 'station',\n\t\tid: 'de:11000:900009101',\n\t\tname: 'U Amrumer Str.',\n\t\tlocation: {\n\t\t\ttype: 'location',\n\t\t\tlatitude: 52.542202,\n\t\t\tlongitude: 13.349534\n\t\t},\n\t\tweight: 2474,\n\t}\n]\n```\n\nYou can filter all stations by `id` or any property ([`lodash.get`](https://lodash.com/docs/#get) will be used).\n\n```js\nconst stations = require('vbb-stations')\n\nconsole.log(stations('de:11000:900009101')) // query a single station\nconsole.log(stations({ // filter by property\n\tweight: 2474,\n\t'location.latitude': 52.542202\n}))\n```\n\n`full.json` contains all stops of each station and unshortened names.\n\n```js\nrequire('vbb-stations/full.json')['de:11000:900009101']\n```\n\nOne entry looks like this:\n\n```js\n{\n\ttype: 'station',\n\tid: 'de:11000:900009101',\n\tname: 'U Amrumer Str. (Berlin)',\n\tlocation: {\n\t\ttype: 'location',\n\t\tlatitude: 52.542202,\n\t\tlongitude: 13.349534\n\t},\n\tweight: 2474,\n\tstops: [\n\t\t{\n\t\t\ttype: 'stop',\n\t\t\tid: 'de:11000:900009101::1',\n\t\t\tname: 'U Amrumer Str. (Berlin)',\n\t\t\tstation: 'de:11000:900009101',\n\t\t\tlocation: {\n\t\t\t\ttype: 'location',\n\t\t\t\tlatitude: 52.542202,\n\t\t\t\tlongitude: 13.349534\n\t\t\t}\n\t\t},\n\t\t// …\n\t\t{\n\t\t\ttype: 'stop',\n\t\t\tid: 'de:11000:900009101::2',\n\t\t\tname: 'U Amrumer Str. (Berlin)',\n\t\t\tstation: 'de:11000:900009101',\n\t\t\tlocation: {\n\t\t\t\ttype: 'location',\n\t\t\t\tlatitude: 52.542202,\n\t\t\t\tlongitude: 13.349534\n\t\t\t}\n\t\t}\n\t]\n}\n```\n\n`names.json` contains only shortened names.\n\n```js\nrequire('vbb-stations/names.json')['de:11000:900009101'] // U Amrumer Str.\n```\n\n\n## API\n\n`stations([pattern])`\n\n`pattern` can be one of the following:\n\n- a station ID, like `de:11000:900009101`\n- `'all'`\n- an object like `{weight: 42, name: 'Alt Pinnow'}`, with each property being mandatory\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/vbb-stations/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderhuerst%2Fvbb-stations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderhuerst%2Fvbb-stations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderhuerst%2Fvbb-stations/lists"}