Analyzing Chess Rankings for Top 50 Grandmasters in Google Sheets Using Chess.com API

Top 50 Grandmaster Chess Ratings from 3 Data Sources

API Call in JavaScript

function chess_api_rapid() {

var response = UrlFetchApp.fetch(“https://api.chess.com/pub/leaderboards")

var json_response = JSON.parse(response);

var ss = SpreadsheetApp.getActiveSpreadsheet();

var chest_score_sheet = ss.getSheetByName(‘ChessData’);

var username;

var score;

console.log(json_response.live_rapid)

for(var i=0; i<json_response.live_rapid.length; i++){

username = json_response.live_rapid[i].username

score = json_response.live_rapid[i].score

console.log(username);

var row = 3 + i

var usernameNameCell = `A${row}`

console.log(“Username Cell: “, usernameNameCell)

var cellToWrite = `B${row}`

console.log(cellToWrite);

chest_score_sheet.getRange(usernameNameCell).setValue(username);

chest_score_sheet.getRange(cellToWrite).setValue(score);

}}

user = lichess.api.user(i)

Daniil Dubov
Dubov Rating

Next Steps:

We Can Also Make a Logistic Regression Equation to Predict Player Rating:

Logistic Regression Graph
Logistic Regression Equation

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store