Turnover percentages
Let's figure out how to sort the teams by median opp_tov_pct
// https://observablehq.com/@d3/d3-groupsort
const teams_by_opp_tov = d3.groupSort(
games,
g => -d3.median(g, d => d.opp_tov_pct),
d => d.team_abb,
)
Let's figure out how to sort the teams by median opp_tov_pct
// https://observablehq.com/@d3/d3-groupsort
const teams_by_opp_tov = d3.groupSort(
games,
g => -d3.median(g, d => d.opp_tov_pct),
d => d.team_abb,
)