Skip to content

Feat: AO Intelligence charts for region pages#118

Merged
f3-jolt merged 1 commit into
stagingfrom
charting
May 8, 2026
Merged

Feat: AO Intelligence charts for region pages#118
f3-jolt merged 1 commit into
stagingfrom
charting

Conversation

@f3-jolt

@f3-jolt f3-jolt commented May 8, 2026

Copy link
Copy Markdown
Collaborator

👋 TL;DR

Adds four new data visualizations to the region stats page — all backed by new BigQuery sub-queries — giving F3 leaders a richer picture of how each AO is performing.

🔎 Details

New charts added to region pages

Chart Data source Window
Unique PAX Over Time charts (existing) Date-filter aware
FNG Acquisition charts (existing) Date-filter aware
Unique Qs per AO ao_q_depth.unique_qs Trailing 90 days
Q Depth per AO ao_q_depth.q_depth_pct Trailing 90 days
Day-of-Week Attendance heatmap ao_heatmap Trailing 90 days

New BigQuery sub-queries in regions.ts:

  • ao_heatmap — avg PAX per AO per day-of-week (Mon–Sat), trailing 90 days, first-F events only
  • ao_q_depth — unique Qs ÷ total workouts per AO, trailing 90 days; used by both the Q Depth % chart and the Unique Qs count chart
  • ao_pax_trend — avg PAX per AO per month for 6 months (data fetched, reserved for a future iteration)

Page layout (region):

[Unique PAX Over Time]  [FNG Acquisition]
[Unique Qs per AO]      [Q Depth per AO]
[Day-of-Week Heatmap]   [Achievements]
[Kotters]               [Upcoming Events]
[Event List]

New types added to types.ts: AOHeatmapData, AOQDepthData, AOPaxTrendData

✅ How to Test

  • Navigate to any region stats page (/stats/region/<id>)
  • Confirm six chart cards render: Unique PAX Over Time, FNG Acquisition, Unique Qs per AO, Q Depth per AO, Day-of-Week Attendance heatmap, Achievements
  • Hover cells on the heatmap — tooltip should show AO · Day: X avg PAX (Y workouts)
  • Hover bars on Q Depth — tooltip should show X% (Y Qs / Z workouts)
  • Verify Q Depth bars color correctly: green ≥70%, amber 50–69%, red <50%
  • Verify "No data" empty states on a region with no workout history
  • Apply a date filter — Unique PAX and FNG charts should update; AO charts (fixed 90-day window) should stay unchanged

🥜 GIF

lack-of-hustle

@f3-jolt f3-jolt requested a review from pstaylor-patrick as a code owner May 8, 2026 16:00
@f3-jolt f3-jolt merged commit de69cd5 into staging May 8, 2026
6 checks passed
@f3-jolt f3-jolt deleted the charting branch May 8, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant