A Python-based data visualization tool that extracts tactical events (captures, checks, and high-intensity conflicts) from chess datasets and maps them onto a 2D intensity heatmap of the chessboard.
- Tactical Parsing: Extracts high-conflict moves (the "violence") from chess game histories.
- Database Integration: Converts raw CSV data into structured SQL format for fast querying and analysis.
- Customizable Mapping: Configurable color mappings, board dimensions, and data limits.
- Automated Setup: One-click scripts to set up clean Python virtual environments across platforms.
heatmap.py: Core execution script that processes chess data and generates visual heatmaps.CSV2SQL_conv.py: Utility script to parse raw CSV datasets into a structured SQL database.config.json: Central configuration file for adjusting script behavior, paths, and aesthetic parameters.requirements.txt: List of required external Python libraries (matplotlib,pandas, etc.).setup_unix.sh: Automation setup script for Linux and macOS.setup_win.ps1: Automation setup script for Windows PowerShell.LICENSE: MIT License.
Get your development environment ready instantly with a single setup command. The scripts automatically handle creating a local virtual environment (.venv) and installing all required packages.
# Clone the repository
git clone https://github.com/GoogleHub67/Chess-Violence-Heatmap
cd Chess-Violence-Heatmap
# Make the setup script executable and run it
chmod +x setup_unix.sh && ./setup_unix.sh
# Activate the environment
source .venv/bin/activate# Clone the repository
git clone https://github.com/GoogleHub67/Chess-Violence-Heatmap
cd Chess-Violence-Heatmap
# Run the setup script
.\setup_win.ps1
# Activate the environment
.\.venv\Scripts\Activate.ps1Modify config.json to specify your file paths, input database configurations, or specific visual preferences.
If your raw chess game data is stored in a .csv file, convert it to a SQL database for optimized performance:
python CSV2SQL_conv.pyRun the main script to process the data and save your generated heatmap image:
python heatmap.pyThis project is licensed under the MIT License - see the LICENSE file for details.