db-hafas-stations
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/db-hafas-stations package

1.0.0 • Public • Published

db-hafas-stations

A list of DB stations, taken from HAFAS.

Warning: This module does not contain stations without an IBNR.

npm version build status ISC-licensed chat with me on Gitter support me on Patreon

Installation

npm install db-hafas-stations

Note: This Git repo does not contain the data, but the npm package does.

Usage

stations() returns a readable stream in object mode, emitting Friendly Public Transport Format station and stop objects.

const stations = require('db-hafas-stations')

stations()
.on('data', console.log)
.on('error', console.error)
{
	type: 'station',
	id: '8000007',
	name: 'Alzey',
	weight: 73.1,
	location: {
		type: 'location',
		latitude: 49.7502,
		longitude: 8.109749
	}
}
// …

stations.full() returns a with more fields per object.

Related

Contributing

If you have a question or have difficulties using db-hafas-stations, 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.

Package Sidebar

Install

npm i db-hafas-stations

Weekly Downloads

36

Version

1.0.0

License

ISC

Unpacked Size

120 MB

Total Files

6

Last publish

Collaborators

  • derhuerst