0.1.0 • Published 6 years ago

bvg-shuttle-gtfs-rt-feed v0.1.0

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

bvg-shuttle-gtfs-rt-feed

Transform the live positions of the BVG autonomous shuttle into a GTFS-Realtime vehicle positions feed.

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

Installing

npm install bvg-shuttle-gtfs-rt-feed

Usage

const fs = require('fs')
const csvParser = require('csv-parser')
const toGtfsRt = require('bvg-shuttle-gtfs-rt-feed')

const convert = toGtfsRt()

fs.createReadStream('vehicle_states.csv')
.pipe(csvParser())
.pipe(convert)
.pipe(…)

convert ist a transform stream that emits Protobuffer GTFS-Realtime VehiclePosition updates.


Download the data from https://hackathon.innoz.de/data and extract it. In the future, this library will fetch liva data from a server.

cat vehicle_states.csv | node example.js >positions.pbf

Contributing

If you have a question or have difficulties using bvg-shuttle-gtfs-rt-feed, 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.