feat(analytics): daily totals series for a date range #84
Labels
No labels
blocked
bug
enhancement
high-priority
low-priority
needs-info
needs-triage
ready-for-agent
ready-for-human
referenced
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gabogg/hikcentral#84
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Route
GET /api/statistics/timeseries/daily?start=YYYY-MM-DD&end=YYYY-MM-DD[&bucket=hour]One row per business day: visitors (ingress), egress, highest peak inside and its time, open-window mean dwell, weekday, holiday flag, and quality (gap-estimated, Data Trust, Cycle Completeness).
Used by
compare=previous,last_yearparameter).Notes
The existing
/timeseries/multidayoverlays intraday curves for a list of dates; it does not return per-day totals, and calling it for 31 dates is not a substitute.Context
Part of the statistics deck redesign, draft RFC in #80 (
docs/architecture/rfc-statistics-deck-display-model.md; mockup linked there). Period selection was decided in #81 (closed): a period is identified bygranularity(day/week/month) and its first business day; see the glossary terms Complete Period and Partial Period. A year period is out of scope.Shared constraints (all statistics-deck routes)
daily_reset_timeboundaries,app/facility_time.py); an in-progress cycle is never returned._COUNTED_CAMERA_JOIN/_COUNTED_CAMERA_FILTER); quarantined events never do.require_auth). Deck routes live in a separate/api/statistics/router so admin-only/api/analytics/routes can't leak into the deck.analytics_service, SQL in repositories.Triage decisions (2026-09-24)
bucket=hourreturns each business day's 24 hourly visitor counts (04:00 → 04:00) with gap-estimated cells marked. The week heatmap uses it.compare=parameter: the deck makes separate calls for the previous period and last year.bucket=hour; longer ranges returnVALIDATION_ERROR.Implemented by #89, merged into
masteras3541af5after two review passes (Standards + Spec). Non-blocking follow-ups are tracked in #96–#100. Closing; this unblocks #80.🤖 Generated with Claude Code