Skip to content

Experiment: Heatmapping#455

Open
baltinerdist wants to merge 1 commit into
amtgard:masterfrom
baltinerdist:feature/heatmap
Open

Experiment: Heatmapping#455
baltinerdist wants to merge 1 commit into
amtgard:masterfrom
baltinerdist:feature/heatmap

Conversation

@baltinerdist

Copy link
Copy Markdown
Contributor

Summary

  • Adds a population heatmap to the Kingdom profile map tab — park pins are weighted by active players (1+ sign-ins in the past 12 months), with a toggle between By Participation (visitors) and By Residents (home park members)
  • Adds a global Atlas Heatmap page (Route=Atlas/heatmap) — same heatmap concept applied across all parks worldwide, gated to kingdom officers and ORK admins
  • Atlas index shows a "Population Heatmap" button for eligible users, linking to the dedicated page
  • Atlas heatmap includes a Hide Pins toggle for a clean heatmap-only view

Auth

Access is gated by querying ork_authorization directly for any kingdom_id > 0 row — correctly handles monarchs regardless of session kingdom_id state.

Test plan

  • Log in as a kingdom officer/monarch — confirm "Population Heatmap" button appears on the Atlas page
  • Navigate to Route=Atlas/heatmap — confirm map loads with heatmap overlay
  • Toggle By Participation / By Residents — heatmap density should change live
  • Toggle Hide Pins — park pins should disappear, leaving only heat signatures
  • Click Show Pins — pins restore
  • Click a park pin — sidebar shows Visitors and Residents counts
  • Log out or use a non-officer account — confirm button is hidden and /heatmap redirects to Atlas
  • Kingdom profile Map tab — confirm heatmap overlay renders, toggle works

🤖 Generated with Claude Code

Adds population heatmap visualizations to the Kingdom profile map tab and
a new global Atlas heatmap page, both weighted by active players (1+ sign-ins
in the past 12 months) with toggles for Participation vs Resident views.

- Kingdom map tab: heatmap overlay with By Participation / By Residents toggle
- Atlas: "Population Heatmap" button (kingdom officers + admins only) linking
  to Route=Atlas/heatmap — a dedicated page with heatmap + hide-pins toggle
- Auth gated via direct ork_authorization query (not session kingdom_id) so
  monarchs are correctly recognized regardless of session state

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
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