bvg-shuttle-gtfs-rt-feed

0.1.0 • Public • Published

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.

Package Sidebar

Install

npm i bvg-shuttle-gtfs-rt-feed

Weekly Downloads

0

Version

0.1.0

License

ISC

Unpacked Size

4.75 kB

Total Files

4

Last publish

Collaborators

  • derhuerst