Home

Awesome

Netlify Status Coverage Status Build Status Dependencies Status License: MIT

transloc-to-gtfs-real-time

The goal of this project is to create a method of converting the proprietary Transloc API to gtfs realtime. This will allow for the data to be in a standardized format, to be used for ingestion by other programs such as google maps.

To run locally

To run on Netlify

The program is designed to run on a function on AWS that can de deployed onto Netlify. Use yarn install && yarn run build as the build command on netlify. The master branch of this repository is being automatically deployed to https://nervous-wing-1097db.netlify.com/.netlify/functions/server currently

How to use

The program currently has two endpoints:

/vehiclepositions/<agencyId>, this can be tested at https://nervous-wing-1097db.netlify.com/.netlify/functions/server/vehiclepositions/20 (or with any other agency ID)

/tripupdates/<agencyId>, this can be tested at https://nervous-wing-1097db.netlify.com/.netlify/functions/server/tripupdates/20 (or with any other agency ID)

Current Limitations

Currently the transloc API does not provide a means to map a vehicle to a specific trip, such as a trip_id or start time / end time. Without this data it is impossible to know for sure when a vehicle is supposed to arrive at a specific stop. It also inhibits the use of this data for ingestion into Google Maps, as Google Maps seems to require trip_id to show any realtime data.

Currently my API key for Transloc is located in src > utilities > constants.js. Feel free to use it for testing, but I would recommend not using it if you plan on running large volumes of requests.

Helpful Tools

Here is a list of helpful tools I have used along the way: