8.8.0 • Published 17 days ago

vbb-stations v8.8.0

Weekly downloads
400
License
ISC
Repository
github
Last release
17 days ago

vbb-stations 🚏

A collection of all stations of the Berlin Brandenburg public transport service (VBB), computed from open GTFS data.

npm version ISC-licensed support me via GitHub Sponsors chat with me on Twitter

Installing

npm install vbb-stations

Usage

The npm package contains Friendly Public Transport Format 1.2.1 stations and stops. weight is the sum of all arrivals & departures at a station, weighted by mode of transport.

[
	{
		type: 'station',
		id: '900000009101',
		name: 'U Amrumer Str.',
		location: {
			type: 'location',
			latitude: 52.542202,
			longitude: 13.349534
		},
		weight: 3563
	}
]

You can filter all stations by id or any property (lodash.get will be used).

const stations = require('vbb-stations')

console.log(stations('900000009101')) // query a single station
console.log(stations({ // filter by property
	weight: 3563,
	'location.latitude': 52.542202
}))

full.json contains all stops of each station and unshortened names.

require('vbb-stations/full.json')['900000009101']

One entry looks like this:

{
	type: 'station',
	id: '900000009101',
	name: 'U Amrumer Str. (Berlin)',
	location: {
		type: 'location',
		latitude: 52.542202,
		longitude: 13.349534
	},
	weight: 3284.25,
	stops: [
		{
			type: 'stop',
			id: '070101000865',
			name: 'U Amrumer Str. (Berlin)',
			station: '900000009101',
			location: {
				type: 'location',
				latitude: 52.542202,
				longitude: 13.349534
			}
		},
		// …
		{
			type: 'stop',
			id: '070201092402',
			name: 'U Amrumer Str. (Berlin)',
			station: '900000009101',
			location: {
				type: 'location',
				latitude: 52.542202,
				longitude: 13.349534
			}
		}
	]
}

names.json contains only shortened names.

require('vbb-stations/names.json')['900000009101'] // U Amrumer Str.

API

stations([pattern])

pattern can be one of the following:

  • a station ID, like 900000009101
  • 'all'
  • an object like {weight: 42, name: 'Alt Pinnow'}, with each property being mandatory

Contributing

If you have a question, found a bug or want to propose a feature, have a look at the issues page.

8.8.0

17 days ago

8.7.0

2 months ago

8.6.0

3 months ago

8.4.0

3 months ago

8.5.0

3 months ago

8.3.0

1 year ago

8.3.1

1 year ago

8.1.0

2 years ago

8.2.0

2 years ago

8.0.0

2 years ago

7.3.2

3 years ago

7.3.1

3 years ago

7.3.0

4 years ago

7.2.0

4 years ago

7.1.0

5 years ago

7.0.0

5 years ago

6.11.0

5 years ago

6.10.0

5 years ago

6.9.0

5 years ago

6.8.0

5 years ago

6.7.0

6 years ago

6.6.0

6 years ago

6.5.0

6 years ago

6.4.1

6 years ago

6.4.0

6 years ago

6.3.0

6 years ago

6.2.1

6 years ago

6.2.0

6 years ago

6.1.0

6 years ago

6.0.0

6 years ago

5.9.0

6 years ago

5.8.0

6 years ago

5.7.0

7 years ago

5.6.0

7 years ago

5.5.0

7 years ago

5.4.0

7 years ago

5.3.0

7 years ago

5.2.0

7 years ago

5.1.0

7 years ago

5.0.0

7 years ago

4.1.0

7 years ago

4.0.0

7 years ago

3.3.0

7 years ago

3.2.0

7 years ago

3.1.0

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

2.1.0

8 years ago

2.0.0

8 years ago

1.0.0

8 years ago

0.4.0

8 years ago

0.3.0

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago