feat(analytics): usual-weekday baselines for intraday routes #88
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#88
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?
Change
Add a baseline to two existing routes instead of creating new ones:
GET /api/analytics/timeseries/hourly?date=…&baseline=same_weekday_4w: adds the mean of the previous 4 same weekdays per bucket.GET /api/analytics/dwell/dayparts?day=…&baseline=same_weekday_4w: adds the usual daypart split.Used by
Day view: visitors by hour against a usual weekday, and the daypart split against usual.
Notes
/dwell/daypartscurrently defaults to the calendar date, not the business day (#77 item 2).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)
nullplus a reason).baselineparameter; the deck reaches them through thin wrappers under/api/statistics/(login, read-only)./dwell/dayparts) first or in the same change.Implemented by #90, merged into
masterasd2f8bd2after two review passes (Standards + Spec). Non-blocking follow-ups are tracked in #96–#100. Closing; this unblocks #80.🤖 Generated with Claude Code