PitchKit
API Reference@pitchkit/coreFunctions

computePositionalBins()

function computePositionalBins<T>(layer, dimensions): PositionalBin[];

Defined in: packages/core/src/heatmap/positional.ts:160

Buckets each datum into the Juego de Posición zone that contains it, by point count or by summed weight — mplsoccer's bin_statistic_positional.

Zones tile the pitch without overlapping, so the first containing zone wins; points outside the pitch extent are ignored (same rule as computeHeatmapBins) and points exactly on the far edge land in the last zone that touches them rather than being dropped.

Type Parameters

Type Parameter
T

Parameters

ParameterType
layerPositionalHeatmapLayer<T>
dimensionsPitchDimensions

Returns

PositionalBin[]

On this page