compute-db-station-weight
Version:
Estimate the weight of a DB station using departures.
33 lines (19 loc) • 1.38 kB
Markdown
# compute-db-station-weight
**Estimate the weight of a [Deutsche Bahn](https://en.wikipedia.org/wiki/Deutsche_Bahn) station using departures.** A small wrapper around [hafas-estimate-station-weight](https://github.com/derhuerst/hafas-estimate-station-weight) and [`hafas-client@6`](https://github.com/public-transport/hafas-client/tree/6).
[](https://www.npmjs.com/package/compute-db-station-weight)

[](https://github.com/sponsors/derhuerst)
[](https://twitter.com/derhuerst)
## Installing
```shell
npm install compute-db-station-weight
```
## Usage
```js
import {computeWeight} = require('compute-db-station-weight')
const leipzigHbf = '8010205'
console.log(await computeWeight(leipzigHbf))
// 951.3
```
## Contributing
If you have a question or have difficulties using `compute-db-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](https://github.com/derhuerst/compute-db-station-weight/issues).