Skip to content

Repository files navigation

Local Club Data Analytics

A real-time data science web dashboard designed for local basketball clubs. Log game events (fouls, points, assists), track player statistics, and use advanced machine learning (SVM) to predict 1v1 matchup outcomes.

Features

  • Live Stat Logging — Log in-game events for local club players.
  • Player Stats Dashboard — Box scores, leaderboards, and per-player event logs.
  • Trends & Insights — Visualizations including cumulative performance over time and stat correlation matrices using Plotly.
  • Machine Learning Predictions — Integrated Support Vector Machine (SVM) model trained to predict 1v1 matchup win probabilities based on comprehensive player statistics.
  • Data Entry Management — Upload CSVs of past games or batch-enter data. Add and remove players from the club roster dynamically.

Project structure

data sci project/
├── ledger.py        # EventLog class for maintaining a chronological list of events
├── stats.py         # Per-player aggregation and metric calculations
├── ml.py            # SVM model and synthetic training data generation
├── app.py           # Streamlit dark-theme dashboard
├── requirements.txt
└── README.md

Prerequisites

  • Python 3.10 or newer
  • pip

Setup and run

From the project directory:

python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
streamlit run app.py

On macOS/Linux, activate with source .venv/bin/activate instead of .venv\Scripts\activate.

The app opens in your browser (default: http://localhost:8501).

Usage

  1. Use the Live Feed tab to log stats (points, fouls, assists) for club players.
  2. Open the Stats Dashboard tab to view the live-updating box score and individual player breakdowns.
  3. Check the Trends & Insights tab to see cumulative points plotted over time and a correlation matrix of player stats.
  4. Go to ML Prediction to run the Support Vector Machine (SVM) and predict head-to-head match outcomes.
  5. Add custom players or upload large CSV logs via the Data Entry tab.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages