Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chess Violence Heatmap

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.

🚀 Features

  • 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.

📂 File Structure

  • 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.

🛠️ Installation & Setup

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.

Linux / macOS

# 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

Windows (PowerShell)

# 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.ps1

💻 Usage

1. Configure the Settings

Modify config.json to specify your file paths, input database configurations, or specific visual preferences.

2. Convert Data (Optional)

If your raw chess game data is stored in a .csv file, convert it to a SQL database for optimized performance:

python CSV2SQL_conv.py

3. Generate the Heatmap

Run the main script to process the data and save your generated heatmap image:

python heatmap.py

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages