Skip to main content

Function: statsByZone()

statsByZone(shots): Record<BasketballZone, Split>

Defined in: packages/sdvplot/src/shots/aggregate.ts:336

Attempts, makes and FG% per zone (aggregate.ts:269-277).

Parameters​

shots​

readonly ShotRow[]

Returns​

Record<BasketballZone, Split>

Example​

import { statsByZone } from "@sportsdataverse/sdvplot/shots";

// a Brooklyn corner three, 2025-26 (sportsdataverse-data nba_stats_shots)
statsByZone([{ x_legacy: 237, y_legacy: 34, shot_distance: 24, shot_value: 3, shot_result: "Made" }]);