Skip to content

Adapt crime cluster colors to active filters - #47

Open
raederhans wants to merge 1 commit into
mainfrom
codex/filter-relative-crime-clusters
Open

Adapt crime cluster colors to active filters#47
raederhans wants to merge 1 commit into
mainfrom
codex/filter-relative-crime-clusters

Conversation

@raederhans

Copy link
Copy Markdown
Owner

Summary

  • derive four crime-cluster count bins from the currently filtered point volume
  • reapply circle color, radius, and label contrast whenever the point source refreshes
  • preserve existing offense-specific single-point colors and request lifecycle behavior

Root cause

Buffer-mode clusters used fixed count thresholds of 10, 50, and 100. Low-frequency offense filters therefore collapsed into the lightest bins even though the underlying point set had changed.

Verification

  • full validate with VITE_FEATURE_DIARY=1 and VITE_TRACT_CRIME_SNAPSHOT=1
  • browser smoke: consoleErrors=0, pageErrors=0
  • bundle policy: PASS
  • npm audit --audit-level=high: 0 vulnerabilities
  • live Burglary visual QA at city extent: distinct light-to-dark cluster levels and no console warnings/errors

Crime cluster colors previously used fixed count thresholds, so low-frequency offense filters collapsed into the lightest bins. Recompute a logarithmic four-stop scale from each applied filtered point set and reapply paint properties when the GeoJSON source refreshes.

Constraint: Preserve category point colors and existing query, cancellation, and layer ownership behavior.

Rejected: Reclassify district choropleths | district and tract renderers already recompute breaks from filtered counts.

Confidence: high

Scope-risk: narrow

Reversibility: clean

Directive: Keep cluster color, radius, and text thresholds derived from the same filtered point total.

Tested: full validate with Diary and tract snapshot flags; browser smoke; adaptive cluster unit and lifecycle tests; bundle policy; npm audit; live Burglary visual QA with zero console errors.
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