- https://action-lab.org/transportation/
- https://www.trincoll.edu/cher/resources/getting-around-hartford/
- https://www.trincoll.edu/studentlife/transportation/bus-pass/
http://65.213.12.244/realtimefeed/vehicle/vehiclepositions.json
https://s3.amazonaws.com/cttransit-realtime-prod/vehiclepositions_pb.json
AWS S3's server response misses an essential Allow-Origin
header that browsers use and enforce for security, so we cannot fetch that feed directly from the client using jQuery. This is why we need an intermediary that currently lives on ReclaimHosting https://cttransit.action-lab.org/. It is a Python script, a simple server that fetches the feed from S3 and outputs it as its own, via https & with the Allow-Origin = *
header.
# DO NOT REMOVE. CLOUDLINUX PASSENGER CONFIGURATION BEGIN
PassengerAppRoot "/home/actionla/real-time-feed"
PassengerBaseURI "/"
PassengerPython "/home/actionla/virtualenv/real-time-feed/2.7/bin/python2.7"
# DO NOT REMOVE. CLOUDLINUX PASSENGER CONFIGURATION END
-
Regularly download fresh GTFS data for Hartford from CTTransit Developers (https://www.cttransit.com/about/developers) whenever they update the file (every few months).
-
Simply run
gtfs/Update routes.ipynb
notebook to refreshgtfs/routes.json
. This way the map knows whichtrip_ids
are relevant and should be displayed from the real time feed. -
Push changes to GitHub repo
-
Regularly download fresh GTFS data for Hartford from CTTransit Developers (https://www.cttransit.com/about/developers) whenever they update the file. Subscribe for alerts. Unzip the archive and place routes.txt and trips.txt files into gtfs folder.
-
Make sure that
route_id
s are up-to-date:- Go to
gtfs/routes.txt
and find all relevant bus routes near Trinity (37-39, 41, 61). - The first number in line is the
route_id
which is longer 5-digit code (example: 10073 route_id matches the 37-39 route) - In
index.html
, find the array variable routesToDisplay (as of 2018, around line 102) and make sure the ids listed there match the ones from trips.txt. Make sure to put them in single or double quotes (e.g. '10073' instead of 10073).
var routesToDisplay = ['10073' /*37-39*/, '10076' /*41*/, '10089' /*61*/]; // Updated Aug 28, 2018
- Go to
-
Push changes to GitHub repo