Skip to content

feat(viz): polish choropleth gallery — contrast markers, richer datasets, full-width MapLibre#4087

Merged
jqnatividad merged 3 commits into
masterfrom
viz-gallery-polish
Jun 28, 2026
Merged

feat(viz): polish choropleth gallery — contrast markers, richer datasets, full-width MapLibre#4087
jqnatividad merged 3 commits into
masterfrom
viz-gallery-polish

Conversation

@jqnatividad

@jqnatividad jqnatividad commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

What

Follow-up to #4086 (merged) addressing gallery-quality feedback on the new viz choropleth examples.

Changes

  • High-contrast smart geo markersviz smart's geo (projection) point markers now use a fixed crimson fill + white outline instead of the palette accent. The palette's first color is a blue that disappears against the geo subplot's light-blue ocean (coastal/island points on a world overview); crimson reads on land, water, and in dark themes.
  • world_cities.csv rebalanced to all seven continents — 33 cities incl. two Antarctic stations, so the smart dashboard's continent breakdown follows the seven-continent convention.
  • us_cities.csv grown 20 → 54 cities across ~35 states — the per-US-state choropleth is now densely filled (36 states) instead of sparse.
  • Standalone --map (MapLibre) choropleth rendered full-width — a tile map's zoom is fixed and the map subplot has no fitbounds (that's a geo-only attribute), so a narrow grid cell cropped it; full-width matches the computed framing width.
  • Documented the Antarctic reverse-geocode edge case — the smart per-country choropleth is reverse-geocoded from lat/lon, and the geocode engine's reverse() has no distance cutoff, so the two Antarctic stations snap to their nearest administering territory (McMurdo → NZ's Ross Dependency, Rothera → the Argentine sector) rather than an "Antarctica" fill. Noted in the figure caption + README; the seven-continent grouping comes from the dataset's own continent column (unaffected).
  • Higher-detail geo base layers — re-pinned the plotly fork to f4f9f3a4 (adds LayoutGeo::resolution) and applied 1:50,000,000 (GeoResolution::OneOverFiftyMillion) to all geo subplots for crisper coastlines/borders; tile-map --map panels unaffected.
  • Drive-by: silenced a clippy slice-indexing lint in dashed_box_latlon.
  • Regenerated gallery.html and the LLM world-choropleth iframe.

Verification

  • Browser-confirmed: crimson markers visible on every continent (incl. the Antarctic stations); world choropleth + seven-continent breakdown; US dashboard's 36-state choropleth; full-width --map figure framed with city context instead of cropped.
  • 139 viz tests pass, cargo clippy clean, cargo +nightly fmt applied.

Notes

  • A "Japan earthquakes choropleth" was reported but verified not present in the current build — qsv viz smart seismic_events.csv --smarter yields 0 choropleth traces (all-Japan resolves to a single country, correctly suppressed). No change needed.

🤖 Generated with Claude Code

jqnatividad and others added 2 commits June 27, 2026 19:31
Address gallery-quality feedback on the choropleth examples:

- viz smart's geo (projection) point markers now use a fixed crimson fill
  with a thin white outline instead of the palette accent. The palette's
  first color is a blue that disappears against the geo subplot's light-blue
  ocean (coastal/island points on a world overview); crimson reads on land,
  water, and in dark themes.
- world_cities.csv rebalanced to span all seven continents (33 cities incl.
  two Antarctic stations), so the smart dashboard's continent breakdown
  follows the seven-continent convention.
- us_cities.csv grown from 20 to 54 cities across ~35 states, so the
  per-US-state choropleth is densely filled instead of sparse.
- The standalone choropleth --map (MapLibre) gallery figure is now rendered
  full-width: a tile map's zoom is fixed (no geo fitbounds equivalent on the
  map subplot), so a narrow grid cell cropped it; full-width matches the
  computed framing width.
- Regenerated the gallery; refreshed the LLM world-choropleth iframe.
- Drive-by: silence a clippy slice-indexing lint in dashed_box_latlon.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…pleth

The smart per-country choropleth is reverse-geocoded from lat/lon, and the
geocode engine's reverse() has no distance cutoff, so the two Antarctic
stations in world_cities.csv snap to the nearest administering territory
(McMurdo -> NZ's Ross Dependency, Rothera -> the Argentine sector) rather than
an "Antarctica" fill. No coordinate yields a clean omission. Document this in
the gallery figure caption and README, and clarify that the seven-continent
grouping comes from the dataset's own continent column (unaffected).

Addresses roborev #3238.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Re-pin the dathere/plotly fork to f4f9f3a4, which adds LayoutGeo `resolution`
(GeoResolution: 50 -> 1:50,000,000 base layers). Apply 50m resolution to all
geo (projection) subplots — standalone `viz geo`/`viz choropleth` and the
smart geo point + choropleth panels — for noticeably crisper coastlines and
borders (finer Mediterranean, Caribbean, Indonesian archipelago, Great Lakes,
small islands). Tile-map (`--map`) panels are unaffected (no geo subplot).

Add a resolution assertion to viz_geo_basic; regenerate the gallery and the
LLM world-choropleth iframe.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jqnatividad jqnatividad merged commit 7fd77b7 into master Jun 28, 2026
19 checks passed
@jqnatividad jqnatividad deleted the viz-gallery-polish branch June 28, 2026 11:32
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