A comprehensive system for tracking, analyzing, and visualizing badminton match results, player ELO ratings, and partnership statistics. Includes a Streamlit web app for interactive exploration and a FastAPI backend for programmatic access.
- Player ELO ranking and progression tracking
- Session and match history analysis
- Head-to-head statistics between any two players
- Partnership win rate analysis
- Manual match entry and new player management
- REST API for player ratings and match history (FastAPI)
- Mobile-friendly UI
badminton/
├── streamlit_app.py # Main Streamlit web app
├── api.py # FastAPI backend for API access
├── elo_system.py # ELO calculation and match processing logic
├── data_io.py # Data loading and saving utilities
├── scheduler.py # Match and rest schedule generation
├── validators.py # Schedule and data validation functions
├── requirements.txt # Python dependencies
├── Dockerfile # Docker build file
├── docker-compose.yml # Multi-service orchestration
├── data/ # Match history, player stats, and session files
└── ...
pip install -r requirements.txtstreamlit run streamlit_app.pyuvicorn api:app --reload- Streamlit UI: http://localhost:8501
- API docs: http://localhost:8000/docs
docker-compose up --build- Streamlit: http://localhost:8501
- API: http://localhost:8000
/players— List all players and ELO ratings/players/{player_name}— Get a specific player's ELO and stats/matches/{player_name}— Get match history for a player/head-to-head/{player1}/{player2}— Get head-to-head stats
data/player_elo_ratings_new.csv— Player ELO and statsdata/match_history_with_elo_*.csv— Match history per sessiondata/session_stats_*.csv— Session stats
- Add new players and matches via the Streamlit UI
- Hide players from rankings by editing the
HIDDEN_PLAYERSlist - Adjust ELO calculation logic in
elo_system.py
MIT License
- Your Name (and contributors)