feat: bivariate choropleth crossing two metrics (#14) - #31
Merged
Conversation
|
Visit the preview URL for this PR (updated for commit 5a3b712): https://homepedia-webapp-cceb1--pr31-feat-bivariate-choro-of1kled6.web.app (expires Sat, 11 Jul 2026 16:37:40 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: d658a29abdbf114e447bbe4bc722d35620c3ead7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #14.
Choroplèthe bivarié : croise deux métriques sur une palette 3×3 pour repérer les zones type « bien notées et abordables ».
Ce qui change
src/lib/scoreColors.ts:makeBivariateScale— classes par terciles rang-based sur chaque axe (même approche quequantileScale, robuste aux distributions resserrées), palette 3×3 bleu-violet (Joshua Stevens). Valeur manquante sur un axe → gris « no data ».src/components/score-sidebar.tsx: checkbox « Croiser avec une 2ᵉ métrique » + sélecteur natif de la seconde métrique ; la légende dégradé est remplacée par la matrice 3×3 avec les axes annotés.src/pages/score-map.tsx:getFillColorbascule sur l'échelle bivariée, tooltip enrichi (les 2 valeurs + la classe bivariée, ex. « faible × moyen »).src/lib/scoreColors.test.ts: tests unitaires de l'échelle (terciles, mapping palette, no-data, cas dégénéré).Vérifié
tsc,vitest(11/11), build Vite OK. Les 4 erreurs eslintreact-refresh/only-export-componentssont préexistantes sur main.Critères d'acceptation