statDefs = ({
results: {
label: "Results",
columns: ["w", "l", "d", "win_pct", "gf", "ga", "gd", "xgf", "xga", "xgd"],
mobileCols: ["w", "l", "win_pct", "gf", "ga", "xgd"],
header: { w: "W", l: "L", d: "D", win_pct: "Win%",
gf: "GF", ga: "GA", gd: "GD", xgf: "xGF", xga: "xGA", xgd: "xGD" },
tooltip: { win_pct: "Win percentage", gf: "Goals for", ga: "Goals against", gd: "Goal difference",
xgf: "Expected goals for (from shot quality)", xga: "Expected goals against", xgd: "Expected goal difference" },
heatmap: { win_pct: "high-good", gd: "high-good", gf: "high-good", ga: "low-good", xgf: "high-good", xga: "low-good", xgd: "high-good" },
sortCol: "win_pct"
},
scoring: {
label: "Scoring",
columns: ["goals", "assists", "shots", "shots_on_target", "big_chances_created", "key_passes"],
header: {
goals: "Goals", assists: "Assists", shots: "Shots",
shots_on_target: "On Target", big_chances_created: "Big Chances", key_passes: "Key Passes"
},
heatmap: {
goals: "high-good", assists: "high-good", shots: "high-good",
shots_on_target: "high-good", big_chances_created: "high-good", key_passes: "high-good"
},
sortCol: "goals"
},
passing: {
label: "Passing",
columns: ["passes", "passes_accurate", "pass_pct", "key_passes", "big_chances_created"],
header: {
passes: "Passes", passes_accurate: "Accurate", pass_pct: "Pass %",
key_passes: "Key Passes", big_chances_created: "Big Chances"
},
heatmap: {
passes: "high-good", passes_accurate: "high-good", pass_pct: "high-good",
key_passes: "high-good", big_chances_created: "high-good"
},
sortCol: "passes",
compute: true
},
defending: {
label: "Defending",
columns: ["tackles", "tackles_won", "interceptions", "clearances", "aerials_won", "aerials_lost"],
header: {
tackles: "Tackles", tackles_won: "Tackles Won", interceptions: "Intercepts",
clearances: "Clearances", aerials_won: "Aerials Won", aerials_lost: "Aerials Lost"
},
heatmap: {
tackles: "high-good", tackles_won: "high-good", interceptions: "high-good",
clearances: "high-good", aerials_won: "high-good", aerials_lost: "low-good"
},
sortCol: "tackles"
},
duels: {
label: "Duels",
columns: ["duels_won", "duels_lost", "aerials_won", "aerials_lost", "was_fouled", "fouls"],
header: {
duels_won: "Duels Won", duels_lost: "Duels Lost",
aerials_won: "Aerials Won", aerials_lost: "Aerials Lost",
was_fouled: "Fouled", fouls: "Fouls"
},
heatmap: {
duels_won: "high-good", duels_lost: "low-good",
aerials_won: "high-good", aerials_lost: "low-good", was_fouled: "high-good", fouls: "low-good"
},
sortCol: "duels_won"
},
discipline: {
label: "Discipline",
columns: ["fouls", "was_fouled", "yellows", "reds", "dispossessed"],
header: {
fouls: "Fouls", was_fouled: "Fouled", yellows: "Yellows",
reds: "Reds", dispossessed: "Dispossessed"
},
heatmap: {
fouls: "low-good", yellows: "low-good", reds: "low-good",
dispossessed: "low-good", was_fouled: "high-good"
},
sortCol: "fouls"
},
custom: {
label: "Custom",
columns: [],
header: {},
heatmap: {},
sortCol: null
}
})
catKeys = Object.keys(statDefs)