Skip to content
Pass in a HAFAS client, estimate the importance of a station.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig
.gitignore
.travis.yml
example.js
index.js
license.md
package.json
readme.md
test.js

readme.md

hafas-estimate-station-weight

Pass in a hafas-client-compatible HAFAS API client and estimate the importance/weight of a station.

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

Installing

npm install hafas-estimate-station-weight

Usage

const createEstimate = require('hafas-estimate-station-weight')
const createHafas = require('vbb-hafas') // can be any `hafas-client`-compatible client
const vbbWeights = require('vbb-mode-weights')

const hafas = createHafas('my-awesome-program')
const estimate = createEstimate(hafas, vbbWeights)

const friedrichstr = '900000100001'
estimate(friedrichstr)
.then(weight => console.log('weight of S+U Friedrichstr. is', weight))
.catch(console.error)
weight of S+U Friedrichstr. is 1882.8

Contributing

If you have a question or have difficulties using hafas-estimate-station-weight, 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.

You can’t perform that action at this time.