Skip to content

spatial-monorepo


spatial-monorepo / ui/src / aggregateByHour

Function: aggregateByHour()

aggregateByHour(readings, tz?): PopularTimesData[]

Defined in: packages/ui/src/PopularTimesChart/aggregateByHour.ts:25

Groups an array of timestamped count readings by day-of-week + hour, averages counts within each slot, and returns a full 7×24 grid.

Parameters

readings

object[]

Array of

tz?

string

IANA timezone string (e.g. 'America/New_York'); defaults to UTC

Returns

PopularTimesData[]

Released under commercial licensing.