Visualization suite: commune pages, explorer, drill-down maps, UX overhaul - #39
Merged
Conversation
…ection - /commune/:code: header stat tiles, weighted 9-dim score radar (Recharts), price evolution with national reference, dept/national price histogram, indicator grid, resident reviews section (word cloud via d3-cloud, per-theme sentiment bars, filterable verbatims) gated on nb_communes_avis - /comparer?a=&b=: URL-driven two-commune comparison (overlaid radars and evolutions, side-by-side indicator table, fixed slot colors) - /explorer: national price distribution, price x score scatter colored by quality/price gap (stratified sampling), regions leaderboard and table - global Ctrl+K search palette over the 34 933-commune index (accent-free prefix ranking, INSEE/department code queries) - map click opens the commune page; meta schema tolerates additive fields - pure helpers (histogram, sampling, search ranking) covered by Vitest
…on /map - /carte: 3-level mesh (regions > departements > communes) with click-to-zoom drill-down, representation switcher (choropleth / bubbles / heatmap with density isolines from the published transaction sample), 'Tous' type filter, fine communes-high LOD loaded per visible departement above zoom 10 - /map: migrated off the deprecated v1/score.geojson to the versioned choropleth (meta.base), adds prix / prix maisons / prix appartements to the metric selector and the bivariate mode; commune panel links to the full page - /classement: fiche and compare shortcuts; landing stats fed by meta.json
- shared NAV (lib/nav.ts) with explicit labels (Carte des prix / Qualite de vie); /classement moves under PageShell; landing links every route (footer included) and its main CTA now opens the price map - PageShell: burger menu below md, visible theme toggle (the 'd' shortcut stays and is advertised in the tooltip) - /map default basemap: satellite -> light (choropleth-friendly first paint) - standardized loading/error wording (status-hint) and NA placeholder (kills the scattered 'n/d'); accent Button variant replaces 6 hardcoded copies; /carte isolines checkbox switches to Radix like /map - price histogram reference label no longer clips
…, accessible dialogs - lib/palettes.ts becomes the single color source: prices read YlOrRd on every page (/map included), the quality/price gap reads PRGn purple/green everywhere (map, explorer scatter, rankings, comparer, fiche tiles, review sentiment) instead of four conflicting encodings - numeric legends: /carte gains its first legend (quantile bins with real thresholds, bubble calibration, heat gradient + isoline thresholds); /map legends now show real bounds (quantile bins, -q95/0/+q95 diverging, tercile thresholds on the 3x3 bivariate matrix) - /map metric selector grouped (Synthese / Prix / Qualite de vie) - search palette and word-cloud popup move to Radix Dialog (focus trap, role, Escape); the popup now renders the shared d3-cloud component fed by the CDN avis artifacts — public/data/wordcloud.json (15.7k lines), avis_top80.csv and lib/parseAvis.ts are deleted
- MapTopBar overlay on both full-screen maps: shared nav, Ctrl+K search,
theme toggle and a cross-link keeping the current viewport ('Voir en
qualite de vie' / 'Voir en prix' via the shared v= param)
- URL state: /carte persists view, representation, property type and heat
options; /map persists metric, bivariate pair, basemap and view through
merging patchParams (the previous setSearchParams({commune}) wiped
everything else)
- adaptive representations on /carte: bubble radius now scales continuously
with zoom, heatmap radius tightens as you zoom, and beyond zoom 11 the
heatmap hands over to individually priced sale points (YlOrRd quantiles,
hover tooltip, dedicated legend)
- drill-down breadcrumb (France > region > departement) with click-to-return,
truncated automatically on manual dezoom
- useScoreMesh: /map now renders regions below zoom 5.5, departements up to 8, then communes — no more 34 928 polygons (3.4 MB) at national zoom. Published median aggregates (score, gap, 12 dimensions under the same n_* names) make every metric and the bivariate mode work at every mesh; clicking a region or departement zooms into it, communes still open the side panel. Deep links ?commune= resolve through the commune mesh regardless of the displayed one - mobile: sidebar becomes a left drawer behind a floating Reglages button below md, the commune panel docks as a bottom sheet, hover tooltips are hidden for coarse pointers
|
Visit the preview URL for this PR (updated for commit 0791df4): https://homepedia-webapp-cceb1--pr39-feat-viz-suite-s8gspw8t.web.app (expires Wed, 15 Jul 2026 13:51:41 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.
Quoi
Neuf commits qui livrent le catalogue de visualisations et la passe UX/navigation :
Nouvelles vues
Cartes
score.geojsondéprécié vers la choroplèthe versionnée parmeta.base, sidebar groupée, drawer mobile.Cohérence
lib/palettes.ts: source unique des couleurs — prix YlOrRd partout, écart qualité/prix PRGn violet/vert partout (4 codages contradictoires avant).accentdu Button, dark-mode toggle visible, classement sous PageShell, landing reliée aux 6 routes.avis/du CDN : -19 000 lignes de données committées supprimées (public/data/*,parseAvis.ts).Données
Consomme le run
2026-07-07du bucket (publié) : agrégats régions/départements avec médianes du score et des 12 dimensions,avis/{dept}.json+avis/index.json,points/transactions-sample.json,charts/*intégrés àpublish-web. PR pipeline associée : T-DAT-902-Homepedia/pipelinesfeat/viz-data.Tests
typecheck,test(33),buildverts ; parcours navigateur complet vérifié (drill-down, deep-links, recherche clavier, mailles adaptatives contrôlées au réseau).🤖 Generated with Claude Code