Return Home
SF MUNI Ridership Analysis and Forecasting
Overview / My Role
This project explored historical weekday ridership on the San Francisco Muni public transportation system. Using time series analysis, I aimed to understand long-term patterns in rider behavior and build forecasting models that could support transit planning. The work was part of a broader effort to study how infrastructure usage evolves over time — and how data can inform smarter decision-making for cities.
Process
I began by cleaning and organizing a dataset of daily boardings across Muni’s rail and bus systems, focusing specifically on weekday usage to remove weekend-related variation. After plotting the data, I identified strong seasonal trends and structural changes — including the sharp dip in ridership due to COVID-19, followed by slow recovery.
To capture these dynamics, I fitted several time series models, including ARIMA and ETS (Exponential Smoothing), testing for stationarity and applying transformations where needed. I split the data into training and testing sets to evaluate how well the models could generalize to future ridership.
Tools
I used R for data cleaning and modeling, and I used time series decomposition and AIC-based model selection to guide my approach and ensure strong predictive performance.
Reflection
This project gave me hands-on experience with real-world time series data and helped me understand the nuances of transit forecasting — where seasonality, sudden change, and external shocks can dramatically reshape what “normal” looks like. It also made me think about how data science can contribute to more efficient, equitable urban systems.
I’ve always been interested in how cities work, and this project was a great way to combine that curiosity with technical skills in forecasting and visualization.