codeforboston/mbta-bustracker

Name: mbta-bustracker

Owner: Code for Boston

Description: Tracks all MBTA buses and subway trains

Created: 2018-04-26 03:23:21.0

Updated: 2018-04-26 03:23:23.0

Pushed: 2018-03-09 03:30:13.0

Homepage:

Size: 13668

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Public instance running at MBTA.fyi

Set up the environment

We use Conda to manage our Python libraries. Install conda

Note that if you choose to install Anaconda (the full version), you probably only need to install GTSF Realtime. But if you choose to install Miniconda, which is way smaller, you'll need to install dependencies later one by one.

Dependencies
GTFS Realtime

install GTFS

install protobuf

install --upgrade gtfs-realtime-bindings

If it's throwing errors about setuptools, do this:

a install -c https://conda.anaconda.org/anaconda setuptools

If it's still not working, try install GTFS using

_install --upgrade gtfs-realtime-bindings
Flask
flask-assets

Using the pyScss and Flask Assets to compile the SCSS files.

install flask-assets
install pyScss
lxml
a install lxml

Get an API key

Sign up for an account on the MBTA realtime Developer Portal and create a new application. It may take a day or two to get approval. Once you get it, create a file called ignore/mbta_api_key.txt and paste your API key there.

Run the App

t clone "https://github.com/robsideshow/mbta-bustracker.git"
 your-path-to/mbta-bustracker
thon flaskbus.py

Open the app at localhost:5000/

API References

MBTA Realtime and GTFS Documentation

NextBus Documentation


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.