Set up your development environment¶
In this section, you'll create the directory for your project and set up a Python environment.
Note
This tutorial uses Python 3.14, but any recent Python version (3.10+) will work.
Create a project directory¶
In your terminal, go to where you want to build your project, then create a new directory, and cd into that directory:
Set up the Python environment¶
Now that you are in the transit-dashboard directory, create and activate a Python virtual environment using venv. Using a virtual environment keeps your project's dependencies isolated from other Python projects on your machine.
Tip
See Python environments in VS Code for a good intro to working with Python virtual environments in VS Code.
Install the required packages¶
Next, install the following packages in the virtual environment:
requests— to fetch data from the APIgtfs-realtime-bindings— to parse GTFS Realtime datadash— a web framework for building interactive dashboards
To install these packages, run:
Validate the environment¶
Run pip list and you should see a list of packages like the following that includes requests, gtfs-realtime-bindings, and dash.