Project 01 · Transit Analytics Case Study

TTC Ridership Recovery & Changing Travel Patterns

This project asks a practical planning question: after COVID disrupted commuting, school trips, leisure movement, and office routines, could TTC ridership still be understood using the same historical patterns? The answer was no. The analysis shows a system that moved through three different regimes: stable seasonal demand, reactive disruption, and partial post-COVID normalization.

Python ETL SAS Regression Ridge & Lasso Tableau + Dash 179 monthly observations
Problem Statement

The pandemic did not just lower ridership. It changed the shape of demand.

Before 2020, transit ridership could be treated as a mostly stable seasonal system. January, September, and November had recognizable demand patterns; previous-year ridership was a strong guide to the present. COVID broke that rhythm. The goal of this project was to identify whether TTC ridership had returned to its old structure, or whether Toronto's travel behavior had entered a new regime.

Business questions

The analysis was designed around four questions that matter for transit planning and public-facing communication:

  • How did ridership change across pre-COVID, COVID/recovery, and post-COVID periods?
  • Which factors were most associated with ridership in each period?
  • Did post-COVID ridership return to historical seasonal behavior?
  • Which variables gained or lost importance after COVID?

Analytical framing

Instead of forcing one model across the full timeline, the project uses a regime-based structure. That choice is the core of the story: ridership is treated as a system whose relationships can change after a shock.

Main idea: a full-period model would hide the most important finding. The same variable can be meaningful in one regime and almost irrelevant in another.
0
monthly observations in the final modeling dataset
0
pre-COVID observations, the most stable baseline period
0
COVID/recovery observations, where normal seasonality broke down
0
post-COVID observations, showing partial normalization
Data Collection

Turning separate public datasets into one monthly analytical file

The project combined TTC ridership with economic and weather context. Because the final question was about medium-term structural change, all sources were standardized to a monthly level. The result was not just a charting table, but a modeling-ready dataset with lag features, regime labels, and quality checks.

SourceRole in the analysisFrequency / transformation
TTC average weekday ridershipMain outcome variable measuring transit demandMonthly
Regular gasoline pricesTravel-cost context and possible substitute-pressure signalMonthly, with lagged value
Unemployment rateLabor-market context connected to commuting demandMonthly, with lagged value
Environment and Climate Change Canada climate dataWeather context: temperature, precipitation, snowfallDaily files appended and aggregated monthly
Derived calendar fieldsMonth, season, COVID regime, and month dummiesEngineered from date fields
Step 01

Reshape & standardize

Ridership data was reshaped from wide yearly/monthly format into a long monthly series. Dates were standardized so every source could share the same time key.

Step 02

Clean & validate

The pipeline checked duplicates, selected relevant fields, aligned monthly records, and handled missingness carefully. Broad climate imputation was avoided to prevent misleading precipitation or snowfall interpretation.

Step 03

Engineer features

The final table added ridership_lag1, ridership_lag12, gas_price_lag1, unemployment_rate_lag1, COVID regime labels, and month dummy variables for statistical modeling.

Exploratory Analysis

The first visual clue was a structural break

The visual story starts with a drop, but the real story is what happened after the drop. Average ridership recovered from the COVID/recovery period, but the post-COVID level remained below the pre-COVID baseline. The project therefore compares both volume recovery and driver recovery.

Average monthly ridership by regime

Pre-COVID demand was high and stable. COVID/recovery collapsed the baseline. Post-COVID recovered to about 76.5% of pre-COVID ridership.

Observation split

The pre-COVID period is the strongest statistical baseline; the smaller later periods are interpreted as regime-comparison evidence.

Model performance changed by regime

The best explanatory structure changed from seasonal memory, to short-run adaptation, then back toward annual memory.
Methods Used

Modeling was built to compare regimes, not to force one universal answer

Multiple linear regression was used because monthly ridership is continuous and the goal was to compare explanatory structure. For each regime, the project tested several model families so the analysis could separate calendar seasonality, ridership memory, and external variables.

Model Family 01

Month-only seasonal baseline

Tests how much ridership can be explained by calendar structure alone. This worked well in stable periods, but poorly during COVID/recovery.

Model Family 02

Lag memory model

Uses ridership_lag1 and ridership_lag12 to test whether demand follows recent momentum or same-month prior-year behavior.

Model Family 03

Reduced external model

Adds gas price and unemployment context to test whether external conditions explain additional variation beyond ridership history.

Selection

Stepwise regression

Used as a compact screening tool, not the only evidence. It helped summarize which predictors survived within each regime.

Regularization

Ridge regression

Used to reduce coefficient instability when predictors overlapped, especially in the smaller COVID/recovery and post-COVID samples.

Selection + Shrinkage

Lasso regression

Used to identify which variables remained after weak effects were shrunk to zero, giving another view of driver importance.

Regularized driver comparison

Ridge coefficients show how the strongest signal moved: annual memory before COVID, gas price and recent ridership during disruption, then annual memory again post-COVID.
Findings

Three regimes, three different ridership systems

The strongest result is not one coefficient or one dashboard number. It is the shift in structure. TTC ridership changed from a stable seasonal system, to a short-run reactive system, and then to a partially normalized system with some new sensitivities.

Pre-COVID: seasonal memory dominated

The month-only model already explained 66.6% of variation, and the lag memory model improved to R² = 0.7717. The dominant variable was ridership_lag12, meaning same-month prior-year demand mattered far more than recent month-to-month movement.

COVID/Recovery: the system became reactive

Seasonality broke down: the month-only model fell to R² = 0.2274. The reduced external model rose to R² = 0.8448, with ridership_lag1 and gas_price_lag1 becoming central. Ridership was no longer following its old annual rhythm.

Post-COVID: partial normalization

Seasonality returned but did not fully restore the old structure. The month-only model reached R² = 0.7007, and ridership_lag12 became significant again. Unemployment and weather also showed more influence than in the pre-COVID baseline.

Final takeaway

TTC recovery should not be interpreted only as “how much ridership came back.” The more important question is “what kind of demand came back?” The project shows that post-COVID ridership recovered in volume, but the system did not simply return to its old pre-COVID logic. Annual seasonal structure partially returned, while labor-market and weather sensitivity became more visible.

Dashboarding & Communication

One analysis, two audiences

The final project was communicated through two dashboard styles. The general dashboard focused on the business story: decline, recovery, seasonality, and headline metrics. The technical dashboard focused on model comparison, coefficient patterns, and regime-specific driver importance.

Manager-facing view

Designed for fast interpretation: recovery rate, ridership trend, month patterns, unemployment context, and concise takeaways. The goal was to make the structural change understandable without requiring the viewer to read regression tables.

Technical view

Designed for analytical review: best model by regime, heatmaps of variable importance, coefficient comparisons, and scatterplot relationships. This view supports deeper questions about why the models changed.

Executive dashboard snapshot

This view presents the project as a clear business story: the pre-COVID baseline, the COVID collapse, the partial recovery, the remaining gap, and the return of seasonal travel patterns.

Executive TTC ridership dashboard showing recovery, COVID drop, ridership over time, ridership by month, unemployment, and key takeaways

Technical dashboard snapshot

This view supports the analytical argument with model comparison, best-driver summaries, coefficient patterns, heatmaps, and factor relationship plots by regime.

Technical TTC ridership dashboard showing model comparison, variable importance, coefficient comparison, and relationship explorers
Want the full statistical backup? Read the technical report for the complete methodology, regression tables, model diagnostics, data dictionary, and regularized regression outputs.
Read the Technical Report
Limitations & Future Work

What this project explains — and what it does not claim

This is an explanatory and comparative project, not a causal proof. The monthly level is strong for strategic pattern analysis, but not for route-level operations or daily forecasting. The COVID/recovery and post-COVID samples are smaller, so those estimates should be read as directional evidence rather than permanent structural laws.

Next 01

Remote-work proxy

Add office occupancy or remote-work intensity to better separate commuting demand from general mobility recovery.

Next 02

Longer post-COVID window

Extend the sample as more months become available so post-COVID model estimates become more stable.

Next 03

Forecasting layer

Compare explanatory models with ARIMAX or other time-series approaches for formal out-of-sample forecasting.

← Back to main page