I made a website that allows you to export and visualize user stats

Sort:
macspacs

Great, I'm working on something similar...but your's definitely much better 👏

notjoemartinez
RSG003 wrote:

Congratulations for such a nice creation of a lovely project. It does solves a complex problem of extraction of data into CSV form of chess.com server. But I think csv data is somewhat incomplete also it lacks few important data like no of moves per game, accuracy of moves per pieces etc. If it can provides these details.It can really appreciated.

Thanks a lot for your hard work & efforts.

The accuracy per move is not available on the API but I have considered integrating client side evaluations using the same library used by the official client

https://github.com/nmrugg/stockfish.js

As far as moves per game that can be done reading the last valid move from the pgn data

Stuckfish

@notjoemartinez Thank you for this incredible tool. I use a linked databases app called notion as an all-in-one workspace for my chess and have been able to use your CSV export option to import my games to do my own statistical analysis- invaluable. I'm trying to work out if there is a way to get my games to be added to a CSV continuously, so that I can just ask Notion to fetch the latest version- currently looking into hosting the data myself, webhooks, all sorts. Please do let me know if you have any straightforward solutions or suggestions for how to accomplish this. Notion has numerous integrations (https://www.notion.so/integrations/all) including Zapier and google sheets. Many thanks again though, the site is fantastic.

duntcare

may I ask since its your first time, if you did use a guide/learn some stuff from books and stuff, what did you use

i want to get into javascript and web stuff but i dont know where to start since ive only primarily made games and stuff in like c++ where there is less amount of framework and integration with stuff

Stuckfish

As an update to my previous comment, I figured out how to do it. I self-hosted n8n and created automations which extract my games from API endpoints and directly populate/update my Notion databases with the jsons.

YankeeBastid

folks, let me interject. I am not a professionally trained coder, I am a business analyst with expertise in flow diagrams, logic spec, and obtaining requirements from the client. However, I have written code for an internal project for a chess tournament, called 4teamchess, which I run here on chess.com daily.

recently open ai introduced ChatGPT and has upgraded it to ChatGPT4o which has helped me immensly. It will create code snippets for you if you provided it witrh the details it needs. You do not need to have a great deal of experience any longer to code sophisticated applications anymore. I recommend that if you need help, turn to ChatGPT, which is free. I did pay for the upgraded version, $20 month but it is worth it to me as I have tournaments to upgrade in Golf, Darts and Bowling using the same format and php8.x versions. Good luck.

Stuckfish
YankeeBastid wrote:

folks, let me interject. I am not a professionally trained coder, I am a business analyst with expertise in flow diagrams, logic spec, and obtaining requirements from the client. However, I have written code for an internal project for a chess tournament, called 4teamchess, which I run here on chess.com daily.

recently open ai introduced ChatGPT and has upgraded it to ChatGPT4o which has helped me immensly. It will create code snippets for you if you provided it witrh the details it needs. You do not need to have a great deal of experience any longer to code sophisticated applications anymore. I recommend that if you need help, turn to ChatGPT, which is free. I did pay for the upgraded version, $20 month but it is worth it to me as I have tournaments to upgrade in Golf, Darts and Bowling using the same format and php8.x versions. Good luck.

I actually got chatGPT 4-o to help me out with my use case, it recommended nodes to use in n8n and wrote me a code snippet to extract a shortened version of game PNGs without the move times.

YankeeBastid

awesome. The fact that it can write code on the fly, with your instructions or event with a snippet of existing code it will correct it if it needs c orrecting. It has saved me WEEKS of work

gabrielserejo

Thanks for using nuxt!

notjoemartinez
duntcare wrote:

may I ask since its your first time, if you did use a guide/learn some stuff from books and stuff, what did you use

i want to get into javascript and web stuff but i dont know where to start since ive only primarily made games and stuff in like c++ where there is less amount of framework and integration with stuff

My goal with this project was to learn JavaScript and a fronted framework as I build it. I always recommend learning by building something rather than following a guide or course (excluding reading the docs). LLMs are powerful learning/debugging tools but if you use them as a crutch you'll notice diminishing returns as your project grows in complexity. If you don't even know what your code is doing, you probably can't compose an LLM prompt to fix it.

notjoemartinez
Stuckfish wrote:

@notjoemartinez Thank you for this incredible tool. I use a linked databases app called notion as an all-in-one workspace for my chess and have been able to use your CSV export option to import my games to do my own statistical analysis- invaluable. I'm trying to work out if there is a way to get my games to be added to a CSV continuously, so that I can just ask Notion to fetch the latest version- currently looking into hosting the data myself, webhooks, all sorts. Please do let me know if you have any straightforward solutions or suggestions for how to accomplish this. Notion has numerous integrations (https://www.notion.so/integrations/all) including Zapier and google sheets. Many thanks again though, the site is fantastic.

So the csv file exported from the site is created on the client side (your browser) so it's not something you can fetch directly from an API endpoint. As you mentioned earlier you can still fetch useful data from the chess.com API just not in the same csv format that is created from my site. If you're feeling adventurous and want to build your own solution I can give you a head start with three functions from the source code that will run on a server-less environment like cloudflare workers. 
1. fetchArchiveUrls This function makes a call to the end point that returns all the other endpoints containing user data, returning them in an array. Next you just loop through all of these URLs and save the data to another array like this and you name this array something like `unparsedGameNodes`
2. parseGameNode This function formats the raw data from the API into a more suitable format. It's not my best work but it does work, simply iterate through `unparsedGameNodes` and pass each element to `parseGameNode` and append the return value to a new array called `parsedGameNodes`
3. exportChessData This function is how the site turns the javascript array of objects into csv, it's a bit too polymorphic to be plug and play but it might help if you're looking for a start on how to convert the previous array data into a csv.
---
I was planning on building out a premium feature that gives you weekly email updates on
your user statistics but got distracted by work and school. I have some more free time this
summer so I might be able to implement said feature. Hope this helps.

duntcare
notjoemartinez wrote:
duntcare wrote:

may I ask since its your first time, if you did use a guide/learn some stuff from books and stuff, what did you use

i want to get into javascript and web stuff but i dont know where to start since ive only primarily made games and stuff in like c++ where there is less amount of framework and integration with stuff

My goal with this project was to learn JavaScript and a fronted framework as I build it. I always recommend learning by building something rather than following a guide or course (excluding reading the docs). LLMs are powerful learning/debugging tools but if you use them as a crutch you'll notice diminishing returns as your project grows in complexity. If you don't even know what your code is doing, you probably can't compose an LLM prompt to fix it.

Thank you for the advice! If I can ask, what framework did you use/would suggest for a similar scale project?

JonathChess

nice!

JonathChess

Its more accurate than with a membership cause it has decimal persents

notjoemartinez
duntcare wrote:
notjoemartinez wrote:
duntcare wrote:

may I ask since its your first time, if you did use a guide/learn some stuff from books and stuff, what did you use

i want to get into javascript and web stuff but i dont know where to start since ive only primarily made games and stuff in like c++ where there is less amount of framework and integration with stuff

My goal with this project was to learn JavaScript and a fronted framework as I build it. I always recommend learning by building something rather than following a guide or course (excluding reading the docs). LLMs are powerful learning/debugging tools but if you use them as a crutch you'll notice diminishing returns as your project grows in complexity. If you don't even know what your code is doing, you probably can't compose an LLM prompt to fix it.

Thank you for the advice! If I can ask, what framework did you use/would suggest for a similar scale project?

It's currently using a Nuxt, Boostrap and ChartJS. Nuxt is is a derivative of Vue.js with a couple more developer tools, I'm refactoring back to Vue once I start adding more features. Vue + A component framework like Boostrap or Vuetify is all you really need if you plan on only doing client side rendering. I was originally hosting with a VPS and Nginx but switched to CloudFlare pages because they have a nice CICD integration with github that will deploy your changes when you push to main.

SmasherBroYT

My does only freeze on 80% is this because i played 400+ games or just it takes time anyone answer

Gegio98
SmasherBroYT wrote:

My does only freeze on 80% is this because i played 400+ games or just it takes time anyone answer

Same, but in my case freeze in 94%...

notjoemartinez
SmasherBroYT wrote:

My does only freeze on 80% is this because i played 400+ games or just it takes time anyone answer

Thanks for reporting this, working on a solution.

notjoemartinez
SmasherBroYT wrote:

My does only freeze on 80% is this because i played 400+ games or just it takes time anyone answer

Just fixed the issue, the problem was with a change in the /pub/player/{username}/games/{yyyy}/{mm} API endpoint. The value for the url key used to be `https://www.chess.com/game/live/[long integer]` it's now `https://www.chess.com/game/uuid` although the legacy game url is still present in the pgn data and will still render the original game. Thanks again for reporting this.

Mohamed

Just tried it to check my new student's account. Thanks for making this great tool, Joe. Keep going!