Bus Locations

URL: ws://streaming.smartcolumbusos.com/socket/websocket

Data Description: This data streams a JSON representation of a modified GTFS vehicle location feed that provides near real time locations for COTA buses. A link to the standard can be found here: https://developers.google.com/transit/gtfs/reference/

Sample: Node JS Example using ws library (This example uses this library https://github.com/websockets/ws)

const WebSocket = require('ws');

const ws = new WebSocket('wss://streaming.smartcolumbusos.com/socket/websocket');

ws.on('open', function open() {
    let joinMesage = { "topic": "vehicle_position", "event": "phx_join", "payload": {}, "ref": 1 }
    console.log('starting listener')
    ws.send(JSON.stringify(joinMesage));
});

ws.on('message', function incoming(data) {
    console.log(data);
});

// ping the server every 30 seconds to let it know we're still here
setInterval(function ping() {
    let heartbeat = { "topic": "phoenix", "event": "heartbeat", "payload": {}, "ref": 1 }
    ws.send(JSON.stringify(heartbeat))
}, 30000)

Example: Uses wsta to read data into a terminal

wsta -I --ping 50 --ping-msg '{"topic":"phoenix","event":"heartbeat","payload":{},"ref":"1"}' \
    'wss://streaming.smartcolumbusos.com/socket/websocket' \
    '{"topic":"vehicle_position","event":"phx_join","payload":{},"ref":"1"}'

Terminal example using https://github.com/esphen/wsta

There are no views created for this resource yet.

Additional Information

Field Value
Data Last updated unknown
Metadata Last updated unknown
Created unknown
Format unknown
License Creative Commons Attribution
Created4 months ago
Id90d51c3b-8c01-4ba4-ac24-a3206458f851
Package Id0777f6e8-6328-4448-949f-7b6a3909f83e
Revision Id3a3a86fb-10fb-4a61-bee6-bda7e8d0611d
Stateactive