NY Sports Attendance Predictor

An interactive tool estimating home game attendance from historical game data, weather, form, and rivalries.

About this Project

This tool predicts home game attendance for 8 NY-area professional sports teams using machine learning. It pulls game results and attendance from the ESPN API, Baseball Reference, and American Soccer Analysis, matching historical weather to each venue via Open-Meteo.

The core model is a Gradient Boosting Regressor trained on normalized fill rates, with COVID-era seasons excluded. It displays leave-one-out feature contributions to show how individual inputs affect the model’s estimate relative to the historical average. These describe model behavior rather than causal effects on attendance.

I built the initial prototype in a few hours with Claude Code, connecting data pipelines, a machine learning model, and an interactive Streamlit application. A central goal was to demonstrate how quickly I could use AI coding tools to turn an idea into a working application.

Interpreting the Predictions

These estimates are exploratory. This page does not report held-out prediction errors or a comparison with a simple baseline, so it does not establish that the model outperforms historical team averages. A time-based evaluation against that baseline would be needed to assess its forecasting value.

Open Full Page View on GitHub