Chess has always had a special place in my heart. It's a sport, a hobby and the thing I fall back on both to de-stress or just have some fun.
As part of my ongoing effort to employ analytics and data engineering to everyday life, I decided to build a dashboard on top of my dataset of 2000+ games. That's roughly 60,000 moves!
For the uninitiated, Chess games can be exported in a special 'PGN' format. So I had to start with writing a Python script that could programmatically access all my games through the API, download them, parse each PGN using a Python script and append into a relational structure before I can start building any visualization.
Today, I managed to finish part 1 of this exercise i.e.
1. Download game archive from chess dot com servers
2. Clean and Parse each file into a readable format
3. Load into a relational structure.
If this excites you, you can use the script to parse your own archives. Just update the user variable to your username and you should be good to go.
https://gist.github.com/DataSherlock/58e6285dbd11cbba9d29b32c5480521d
I will share the link to the dashboard once I finish.
Yes, sounds very nice.
Did you learn anything?
Is there any useful data in the API that isn't provided to users in stats?
Chess has always had a special place in my heart. It's a sport, a hobby and the thing I fall back on both to de-stress or just have some fun.
As part of my ongoing effort to employ analytics and data engineering to everyday life, I decided to build a dashboard on top of my dataset of 2000+ games. That's roughly 60,000 moves!
For the uninitiated, Chess games can be exported in a special 'PGN' format. So I had to start with writing a Python script that could programmatically access all my games through the API, download them, parse each PGN using a Python script and append into a relational structure before I can start building any visualization.
Today, I managed to finish part 1 of this exercise i.e.
1. Download game archive from chess dot com servers
2. Clean and Parse each file into a readable format
3. Load into a relational structure.
If this excites you, you can use the script to parse your own archives. Just update the user variable to your username and you should be good to go.
https://gist.github.com/DataSherlock/58e6285dbd11cbba9d29b32c5480521d
I will share the link to the dashboard once I finish.