Skip to content
This repository has been archived by the owner on Apr 13, 2020. It is now read-only.

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

License

Notifications You must be signed in to change notification settings

derhuerst/bvg-shuttle-gtfs-rt-feed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.