https://github.com/markjsapp/wmata_displayed
A python progrma that prints out estimated train arrival times for the Washington D.C. Metro
https://github.com/markjsapp/wmata_displayed
Last synced: about 1 year ago
JSON representation
A python progrma that prints out estimated train arrival times for the Washington D.C. Metro
- Host: GitHub
- URL: https://github.com/markjsapp/wmata_displayed
- Owner: markjsapp
- Created: 2022-05-01T06:03:26.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-16T04:54:25.000Z (about 3 years ago)
- Last Synced: 2025-01-26T15:30:52.725Z (over 1 year ago)
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WMATA_Displayed
WMATA Train Tracker is a console-based application that uses WMATA's public API to display real-time train arrival information for a specified metro station. The application updates wait times at regular intervals, providing users with up-to-date information on train arrivals.
Features
- Displays train line, arrival station, destination station, and wait time for each train
- Color-coded output for easier readability
- Updates train arrival information every 30 seconds
- Utilizes WMATA's public API for accurate, real-time data
- Customizable station codes for tracking trains at different metro stations
## Installation
1. Clone the repository or download the source code.
git clone https://github.com/yourusername/wmata-train-tracker.git
2. Navigate to the project directory.
cd wmata-train-tracker
3. Install the required Python packages.
pip install -r requirements.txt
4. Set up an environment variable WMATA_API_KEY with your WMATA API key.
- For Windows:
setx WMATA_API_KEY "your_api_key"
- For Linux and macOS:
export WMATA_API_KEY="your_api_key"
## Usage
Run the script.
python main_display.py
The script will display train arrival information for the specified station (default is Court House).
To track a different station, update the location_code variable in the main function with the desired station code.
python
location_code = 'K01' # Replace 'K01' with your desired station code
## Relevant NOVA Station Codes
- Virginia Square: K03
- Ballston-MU: K04
- Clarendon: K02
- Court House: K01
- Rosslyn: C05
- Pentagon City: C08
## License
This project is licensed under the MIT License - see the LICENSE file for details.