The dimension tables behind every league
{
"BASKETBALL_SPECS.nba lane": {
"court_units": "ft",
"lane_width": "16, 12",
"lane_length": "19, 19",
"free_throw_line_to_backboard": 15,
"basket_center_to_three_point_arc": "23.75"
},
"@sportsdataverse/sporty/specs": {
"BASEBALL_SPECS": "7 leagues: custom, little league, milb, mlb, ncaa, nfhs, pony",
"BASKETBALL_SPECS": "7 leagues: custom, fiba, nba, nba g league, ncaa, nfhs, wnba",
"CURLING_SPECS": "3 leagues: curling canada, custom, wcf",
"FOOTBALL_SPECS": "8 leagues: cfl, custom, ncaa, nfhs11, nfhs6, nfhs8, nfhs9, nfl",
"HOCKEY_SPECS": "12 leagues: ahl, custom, echl, iihf, ncaa, nhl, nwhl, ohl, phf, pwhl, qmjhl, ushl",
"LACROSSE_SPECS": "8 leagues: custom, ncaam, ncaaw, nll, pll, usam, usaw, world lacrosse",
"SOCCER_SPECS": "6 leagues: custom, epl, fifa, mls, ncaa, nwsl",
"TENNIS_SPECS": "7 leagues: atp, custom, ita, itf, ncaa, usta, wta",
"VOLLEYBALL_SPECS": "4 leagues: custom, fivb, ncaa, usa volleyball"
}
}import { BASKETBALL_SPECS } from "@sportsdataverse/sporty";
import * as specs from "@sportsdataverse/sporty/specs";
// Every league is a row of numbers (sportyR's surface dimensions, in the league's own units).
const nba = BASKETBALL_SPECS.nba;
// @sportsdataverse/sporty/specs exports one *_SPECS table per sport.
const tables = Object.entries(specs).filter(([name]) => name.endsWith("_SPECS"));
{
"BASKETBALL_SPECS.nba lane": {
court_units: nba.court_units,
lane_width: nba.lane_width.join(", "),
lane_length: nba.lane_length.join(", "),
free_throw_line_to_backboard: nba.free_throw_line_to_backboard,
basket_center_to_three_point_arc: nba.basket_center_to_three_point_arc.join(", "),
},
"@sportsdataverse/sporty/specs": Object.fromEntries(
tables.map(([name, table]) => [
name,
`${Object.keys(table).length} leagues: ${Object.keys(table).join(", ")}`,
]),
),
};
Tags: specs · BASKETBALL_SPECS · basketball · nba. All sporty examples.