Show evolution of win/draw/loss evaluation over time, can be filtered in between turns to show a single chessgame.
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {
"url": "https://github.com/CGI-FR/crowd-chess-data/refs/heads/main/20240927-turns.csv"
},
"width": 800,
"height": 600,
"transform": [
{"filter": {"field": "id", "lt": 6210}},
{"filter": {"field": "id", "gt": 6152}},
{"fold": ["win", "draw", "loss"], "as": ["Résultat", "Probabilité"]},
{"calculate": "indexof(['win', 'draw', 'loss'], datum.Résultat)", "as": "order"}
],
"mark": "area",
"encoding": {
"x": {"field": "end_of_turn", "type": "temporal", "title": "Heure"},
"y": {
"field": "Probabilité",
"type": "quantitative",
"stack": "normalize",
"title": "Probabilité cumulée (%)",
"axis": {"format": "%"}
},
"color": {
"field": "Résultat",
"type": "nominal",
"title": "Résultat",
"scale": {
"domain": ["win", "draw", "loss"],
"range": ["#f5f5dc", "#808080", "#000000"]
}
},
"order": {"field": "order", "type": "ordinal"}
}
}