mav-stations
v0.3.2
Published
A list of MAV stations.
Downloads
31
Maintainers
Readme
mav-stations
A collection of all* stations of Magyar Államvasutak (MÁV, Hungarian State Railways), requested from an endpoint used by their website.
(* All stations that would appear when using the MAV website. This excludes internally used stations or sub-stations like "München Hbf Gl.5-10"
with ID "008069685"
.)
Installing
npm install mav-stations
Note: This Git repo does not contain the data, but the npm package does.
Usage
readStations()
returns a readable stream in object mode, emitting Friendly Public Transport Format station
objects.
import { readStations } from 'mav-stations';
for await (const station of readStations()) {
console.log(station);
}
{
type: 'station',
id: '005510009', // EVA-like number
name: 'BUDAPEST*',
aliasNames: ['Bp (BUDAPEST*)'], // if several names for the same station exist
baseCode: '3638', // only defined on Hungarian stations
isInternational: false, // true if international trains available (?)
canUseForOfferRequest: true,
canUseForPassengerInformation: false,
country: 'Hungary',
countryIso: 'HU',
isIn108_1: true, // apparently only true for select Hungarian stations; "internationalCapable"
transportMode: {"code": 100,"name": "Rail", "description": "Rail. Used for intercity or long-distance travel."}
}
// and a lot more…
Related
db-stations
– A list of DB stations (data from DB station API).db-stations-autocomplete
– Search for stations of DB (data from DB station API).db-hafas-stations
– A list of DB stations, taken from HAFAS.db-hafas-stations-autocomplete
– Search for stations of DB (data from HAFAS).
Contributing
If you have a question, found a bug or want to propose a feature, have a look at the issues page.