trimet-live-archive
get live trimet vehicle data into a dat or regular fs file
- data parsed to ndjson values (optionally as geojson)
Install
npm install trimet-live-archive
Usage
See example.js
for full example.
- Sign up for trimet API & Get
appID
. - Create a hyperdrive archive to write to
var trimetDat = var archive = var appID = 'YOUR_APP_ID' var trimet = trimet
Using Regular Fs
You can write to a regular fs file too!
var trimetDat = var appID = 'YOUR_APP_ID' var trimet = trimet
API
var trimet = trimetDat(archive, opts)
archive
: hyperdrive archive or fsopts.appID
: required trimet app idopts.geojson
: write data as geojsonopts.dataFile
: path to write json data to
trimet.fetch(cb)
Fetch live vehicle data! Writes to archive files.
Debugging
Use DEBUG=trimet-live-archive
when running the process.