This interactive dashboard, "MTA Ridership Explorer," provides a comprehensive view into ridership trends and post-pandemic recovery across the Metropolitan Transportation Authority (MTA) network in New York City. Explore daily ridership data across various MTA services, including subways, buses, commuter rails (LIRR and Metro-North), paratransit (Access-A-Ride), bridges and tunnels, and the Staten Island Railway. The dashboard aims to highlight ridership patterns since the start of the COVID-19 pandemic, offering a glimpse into recovery trends and the current state of public transit usage. Users can switch between daily, weekly, monthly, and yearly views to examine the data and compare both absolute ridership numbers and the percentage recovered compared to pre-pandemic levels.
- 📊 Interactive Trend Analysis: Visualize ridership recovery trends with interactive line charts, comparing both estimated ridership volumes and percentage drops from pre-pandemic levels.
- 🚆🚌 Multi-Service Selection: Analyze any combination of MTA's services – Subways, Buses, Long Island Rail Road, Metro-North, Access-A-Ride, Bridges and Tunnels, and Staten Island Railway – to uncover distinct recovery patterns.
- 🗓️ Flexible Timeframes: Adjust the analysis period using start and end date selectors to focus on specific time windows and observe recovery rates over different durations.
- 📅 Granular Data Aggregation: Switch between daily, weekly, monthly, and yearly views to gain insights into short-term fluctuations and long-term trends.
- 📈 At-a-Glance Statistics: Quickly grasp key performance indicators such as peak ridership and recovery percentages for each selected service.
- 🤖 AI-Powered Insights: Leverage the power of Large Language Models (LLMs) to generate insightful narratives and summaries of the displayed ridership trends, adding context and understanding to the visualizations. (Note: Remember to independently verify LLM-generated insights.)
- 💻 Open Source & Customizable: The code for this dashboard is available on GitHub, allowing for customization and extension.
Requires Python 3.12
- Clone the repository:
git clone https://github.com/taruma/mta-dash.git
- Navigate to the project directory:
cd mta-dash
- Configure Environment Variables:
- Create a
.env
file in the project root directory. - Add the required environment variables. For example:
OPENAI_API_KEY=your_openai_api_key
- Create a
- Enable Debug Mode (Optional for Development):
- Open
appconfig.py
in a text editor. - Uncomment the following lines to enable debug mode:
# appconfig.dash.debug = True
- This will allow detailed error messages and enable live reload during development.
- Open
- Run & Install the dashboard:
uv run app.py
After running the dashboard, open your browser and navigate to your app to start exploring MTA ridership data.
Dataset sourced from Plotly Datasets.
This project is licensed under the MIT License. See the LICENSE file for details.
This app was created as a submission for the Plotly & Maven Analytics Holiday Season App Challenge.