Skip to content

🦃 Process MBTA events into a format that can be consumed by the Data Dashboard

License

Notifications You must be signed in to change notification settings

transitmatters/gobble

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

117 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gobble

lint test deploy

Screenshot in action

Gobble is a service that reads the MBTA V3 Streaming API for all train/bus events, and writes them out to a format that can be understood by the TransitMatters Data Dashboard.

Requirements to develop locally

  • uv with Python 3.13
    • Ensure uv is using the correct Python version by running uv venv --python 3.13

Development Instructions

  1. Duplicate config/template.json into config/local.json, and change the null out with your MBTA V3 API key.
  2. In the root directory, run uv sync --group dev to install dependencies followed by uv run pre-commit install to install pre-commit hooks
  3. Run uv run src/gobble.py to start.
  4. Output will be in data/ in your current working directory. Good luck!

Container

You can also run Gobble inside a container using the following docker build and docker run commands

docker build -t gobble -f Containerfile .
docker run \
    -v ./config/local.json:/app/config/local.json:z \
    -v ./data:/app/data:z \
    gobble:latest

Output will be in data/ in your current working directory. Good luck!

Linting

You can run the linter against any code changes with the following commands

$ uv run ruff check --fix src
$ uv run ruff format src

Support TransitMatters

If you've found this app helpful or interesting, please consider donating to TransitMatters to help support our mission to provide data-driven advocacy for a more reliable, sustainable, and equitable transit system in Metropolitan Boston.

About

🦃 Process MBTA events into a format that can be consumed by the Data Dashboard

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Contributors 11

Languages