This project provides a Python script (multi_player_radar.py) to generate customizable radar (spider) charts from saved HTML files from FBRef.com's player comparison tool. It extracts relevant statistics, computes per 90-minute values, and visualizes comparisons between players using matplotlib.
⚠️ Disclaimer: This tool is for personal and educational use only. It does not scrape FBRef.com or interact with their servers. Users must manually download HTML files and use them locally. Please ensure you comply with FBRef's Terms of Use.
- Parses statistics from user-saved FBRef Player Comparison HTML pages
- Compares multiple players based on specified statistics
- Computes per-90-minute values for applicable metrics
- Customizable radar charts:
- Polygonal or smooth outlines
- Background, text, and grid colors
- Custom fonts and title prefix
- Command-line interface with flexible flags for customization
- Clone the repository
git clone https://github.com/your-username/fbref-comparison-radar.git
cd fbref-comparison-radar- Create and activate a virtual environment (optional but recommended)
python3 -m venv venv
source venv/bin/activate # For Linux/macOS
# .\venv\Scripts\activate # For Windows CMD
# .\venv\Scripts\Activate.ps1 # For PowerShell- Install dependencies
pip install -r requirements.txt- Download HTML files manually from FBRef
- Navigate to the Player Comparison tool on FBRef
- Save the page as "Webpage, Complete"
- Place the
.htmlfile in thehtmls/directory
python multi_player_radar.py scrk-uclpython multi_player_radar.py scrk-ucl \
--players "Chiesa Federico" "Rashford Marcus"python multi_player_radar.py scrk-ucl --save \
--title "Winger Comparison" --output-dir data_vizpython multi_player_radar.py scrk-ucl --polygonal --bgcolor "#2C2C2C" \
--textcolor "#EDEDED" --circlecolor "gray"python multi_player_radar.py --helpmulti_player_radar.py— Main scriptrequirements.txt— DependenciesREADME.md— Project documentationhtmls/— Your downloaded FBRef HTML filesdata_viz/— Output imagesexamples/— Example radar charts
- Python 3.8+
- beautifulsoup4>=4.9.0
- numpy>=1.18.0
- matplotlib>=3.3.0
Contributions are welcome! Feel free to fork this repo and submit a pull request.
