Skip to main content

Making chess analytics easy.

Project description

Chess-Analytica: Simplifying Chess Analytics

Introduction

Chess-Analytica is a powerful chess library designed for effortless data scraping and analysis. Utilizing the chess.com API, it builds upon the robust python-chess library, enabling users to scrape and analyze past or current games of any player with ease.

Key Features:

  • Easy scraping of game data from chess.com profiles.
  • Advanced game filtering options.
  • Comprehensive analysis of game patterns and styles.

Quick Start

Here's a glimpse of what you can do with Chess-Analytica:

from chess_analytica import Board, ChessDotCom

profile = ChessDotCom.Profile("aronfrish", False)

profile.filterGameType("rapid")

print(len(profile.games)) #720

n = 0
for game in profile.games : #Note: this is still filtered to rapid
if ("resignation" in game.termination) :
    n += 1
print(n) #Note: this will print the number of the player's rapid games that ended in resignation
#334

italian_games = profile.find_games_with_FEN_and_Color("r1bqkbnr/pppp1ppp/2n5/4p3/2B1P3/5N2/PPPP1PPP/RNBQK2R", True) #Note: this FEN is the italian game and the target player color is white (because is_white is set to True)
print(len(italian_games)/len(profile.white_games)) #Note: this will print the percentage of rapid games (where the player is white) that the player has played the italian game
#0.013888888888888888

Installation

Easily install Chess-Analytica using pip:

pip install chess-analytica

Documentation and Resources

Explore detailed documentation and examples to get the most out of Chess-Analytica:

  • Documentation: Full Documentation <https://chess-analytica.readthedocs.io/en/latest/>_
  • Usage Examples: Examples <https://chess-analytica.readthedocs.io/en/latest/usage.html>_
  • API Reference: ChessDotCom Class <https://chess-analytica.readthedocs.io/en/latest/chessdotcom.html>_ | Board Class <https://chess-analytica.readthedocs.io/en/latest/board.html>_

License

Chess-Analytica is open-sourced and available under the MIT License. For more details, see LICENSE.txt.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chess-analytica-1.1.8.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chess_analytica-1.1.8-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file chess-analytica-1.1.8.tar.gz.

File metadata

  • Download URL: chess-analytica-1.1.8.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for chess-analytica-1.1.8.tar.gz
Algorithm Hash digest
SHA256 8ac710e30356d8b4ec6957287882ddfbbf0c28c843b815db387e27e7984386a5
MD5 e86f6f6c95b93735217f5aee78c763a5
BLAKE2b-256 1ef9182db81dce4ce2cc275ae3e70462fd294c4f527abcce9f3d62ac17a7928b

See more details on using hashes here.

File details

Details for the file chess_analytica-1.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for chess_analytica-1.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 fb9b10da3bc8bddd29f8fde47dcaa86c9b017f5b962e16560681ae567f0325f4
MD5 fe45315a2b29966fd986af53529d5008
BLAKE2b-256 3ee9827efdf6983bd3484547ee47ada92460201ec71c8e86be9b9c6742b4f028

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page