cartography-geoviz — Claude Code skill: maps and geovisualization
Skill for building thematic maps — choropleths, proportional symbols, bivariate schemes, and interactive layers. Teaches the agent to pick classification, palette, projection, and normalization so the map tells the truth.
npx skills add muend/geoai-skills --skill cartography-geoviz -a claude-codeWhat cartography-geoviz does
Triggers on any request to create, compare, or review a user-facing map. Distinguishes map types by data: choropleth for normalized rates, proportional symbols for raw counts, bivariate for two related variables, heatmap or dot density for individual events. Checks normalization: raw-count polygons turn into population maps, and the agent will suggest rates or density instead.
Inside are tables for projection choice, classification (equal interval, quantile, Jenks, manual), and ColorBrewer palettes with colorblind checks. For map series it locks class breaks so panels stay comparable. Without GeoPandas or QGIS the skill fails: it orchestrates plot() arguments, scheme=, cmap=, and legend rendering. For interactive maps it configures Folium or deck.gl and requires tiling layers above fifty thousand features.
Five-step protocol: squint test at thumbnail size, colorblind simulator pass, legend audit (units, rounding, non-overlapping class edges), cross-check three features against the attribute table, and verify identical class breaks for series. Without denominator, CRS, or units the agent qualifies the result as unfinished.
What it helps with
- select map type and classification from data semantics
- normalize counts to density or rate for choropleth encoding
- lock class breaks across map series for comparison
- render interactive map with legend and formatted tooltips
- check palette for colorblind safety and NoData for separate color
Example prompts for the agent
- Build a disease-rate choropleth by district with quantile classification and YlGnBu palette
- Compare two dates on maps with identical class breaks using
scheme='userdefined' - Make a Folium interactive map with legend, tooltips, and formatted numbers
How to install cartography-geoviz
1Skills CLI (Vercel)
npx skills add muend/geoai-skills --skill cartography-geoviz -a claude-code2Manually: put the files in place
~/.claude/skills/cartography-geoviz/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/cartography-geoviz/
1Skills CLI (Vercel)
npx skills add muend/geoai-skills --skill cartography-geoviz -a codex2Manually: put the files in place
.agents/skills/cartography-geoviz/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add muend/geoai-skills --skill cartography-geoviz -a cursor2Manually: put the files in place
.cursor/skills/cartography-geoviz/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install muend/geoai-skills cartography-geoviz2Manually: put the files in place
.github/skills/cartography-geoviz/SKILL.md1Skills CLI (Vercel)
npx skills add muend/geoai-skills --skill cartography-geoviz -a gemini-cli2Platform CLI
gemini skills install https://github.com/muend/geoai-skills --path skills/cartography-geovizManually: put the files in place
.devin/skills/cartography-geoviz/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add muend/geoai-skills --skill cartography-geoviz -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about cartography-geoviz
How to install cartography-geoviz in Claude Code?
Run npx skills add muend/geoai-skills --skill cartography-geoviz -a claude-code, and the skill lands in ~/.claude/skills/cartography-geoviz/SKILL.md.
What does cartography-geoviz do?
Orchestrates thematic map creation: picks type (choropleth, proportional symbols, bivariate), classification, palette, and projection; checks normalization, legend, and colorblind accessibility; locks class breaks in map series.
What libraries does cartography-geoviz require?
GeoPandas for static maps (plot() calls, classification, PNG/PDF export), Folium or MapLibre for interactive layers, deck.gl or Kepler.gl for large point datasets. QGIS is mentioned as an alternative for layout.
Source text
SKILL.md · MIT
---
name: cartography-geoviz
description: >-
Always invoke before answering any request to create, compare, design, or
review a user-facing map, even if the request is terse or underspecified.
Covers publication maps, choropleths, map series and small multiples,
comparable multi-date panels, proportional/bivariate/flow maps, raster
rendering, and interactive web maps. Includes classification, color,
legends, projections, accessibility, and large-data aggregation. Do not
trigger for a temporary diagnostic plot inside another analysis.
license: MIT
metadata:
author: Muhammed Enes Duran
---
# Cartography & Geovisualization
Purpose: maps that communicate honestly. Cartographic choices (class
breaks, ramps, normalization, projection) can manufacture or hide
patterns; this skill treats them as analytical decisions with stated
rationale, not styling.
## The first three questions
1. **What's the message?** One map = one message. If two variables
compete, consider small multiples or a bivariate scheme — not twelve
legend classes.
2. **Normalized?** Choropleths of raw counts are population maps in
disguise. Rates, densities, or per-capita for area-based color; raw
magnitudes → proportional symbols instead.
3. **Static or interactive?** Print/PDF/paper → matplotlib/QGIS layout;
exploration/stakeholders → Folium/MapLibre; big point data →
Kepler.gl/deck.gl (GPU).
## Thematic map type selection
| Data | Map type |
|---|---|
| Rate/ratio by polygon | Choropleth |
| Count/magnitude by place | Proportional/graduated symbols |
| Two related rates | Bivariate choropleth (3×3 max) |
| Individual-level density | Dot density or KDE surface (label bandwidth) |
| Continuous field (raster) | Classified or stretched render + hillshade context |
| Movement/OD | Flow map (width∝volume), aggregate to avoid hairballs |
| Change over time | Small multiples > animation for analysis; animation for outreach |
## Classification — the honesty lever
- **Natural breaks (Jenks)**: default for skewed data; breaks are
data-specific, so NOT comparable across maps/dates.
- **Quantiles**: guaranteed color balance; can split near-identical values.
- **Equal interval**: comparable and intuitive; fails on skew.
- **Manual/defined**: the ONLY correct choice for map series (same breaks
across all dates/regions) and for domain thresholds (WHO limits, slope
classes).
- 5±2 classes; show the histogram with breaks in the workflow; state the
scheme in the caption/metadata. Try two schemes — if the story changes
materially, the story is the classification, and the reader must be told.
## Color
- Ramps from ColorBrewer/`cmcrameri`/viridis family: sequential (ordered),
diverging (meaningful midpoint — zero, mean, threshold), qualitative
(categories, ≤ 8).
- Colorblind-safe by default (~8% of male readers); never red-green
diverging without checking a CVD simulator.
- NoData ≠ zero: render as neutral gray with its own legend entry, never
the ramp's low end.
- Muted basemaps (CartoDB Positron) under thematic layers — the basemap
must never win.
## Projection for display
- Web tiles = Web Mercator: fine for city scale; area comparisons at
continental scale on Mercator are visual lies — use equal-area
projections (Albers, Mollweide, Equal Earth) for static thematic maps of
large extents.
- National mapping → the national grid; polar work → polar stereographic.
- Label the projection on publication maps.
## Required furniture (publication static maps)
Title (the message, not the filename), legend (units!, sensible number
formatting), scale bar (projected CRS only — degrees have no fixed scale),
north arrow (only when north isn't up or the audience expects it), data
source + date + projection + author, and an inset locator map for
unfamiliar regions.
```python
# GeoPandas static map core
ax = gdf.plot(column="rate_per_1k", scheme="naturalbreaks", k=5,
cmap="YlGnBu", legend=True, edgecolor="white", linewidth=0.3,
missing_kwds={"color": "#d9d9d9", "label": "No data"})
ax.set_axis_off()
```
Export: 300 dpi PNG/PDF for print; SVG when editors will touch it; COG +
style for GIS handoff.
## Interactive maps
- Folium/MapLibre: tooltips with formatted values, layer control, sensible
initial bounds (`fit_bounds`), legend included (Folium needs a manual
HTML/branca legend — don't ship without one).
- Performance: >~50k vector features → tile it (tippecanoe → PMTiles) or
switch to deck.gl/Kepler; never dump 500k GeoJSON features into Leaflet.
- Every popup number formatted (thousands separators, units, rounding
matched to precision honesty).
## Verification protocol
1. Squint test: does the message survive at thumbnail size?
2. CVD simulation pass.
3. Legend audit: units, rounding, class edges non-overlapping.
4. Cross-check 3 features' rendered values against the attribute table
(classification bugs are silent).
5. For map series: identical breaks, ramp, and extent across panels.
## Pitfalls checklist
- Raw-count choropleth (population in disguise).
- Jenks breaks compared across two dates.
- Red-green diverging ramp, unlabeled midpoint.
- NoData painted as the lowest class.
- Scale bar on an unprojected (degree) map.
- Continental-area comparisons on Web Mercator.
- Interactive map with no legend or units.
## Execution contract
- **Workflow:** inspect audience, data semantics, scale, and output medium; select projection, normalization, classification, and visual hierarchy; render; verify; export.
- **Decision rules:** choose map type from the analytical question, normalize counts when exposure differs, and keep breaks fixed for comparisons.
- **Verification protocol:** run the five checks above and reconcile rendered values, units, class edges, and missing-data treatment against the source.
- **Failure modes:** stop or qualify delivery when denominators, CRS, units, accessibility, or cross-panel comparability are unresolved.
- **Deliverables:** final map, legend and units, data/source note, projection and classification rationale, accessibility note, and reproducible style or code.
- **Source freshness:** consult [the authoritative source registry](references/authoritative-sources.md) before using version-sensitive APIs and record the checked date.
© Muhammed Enes Duran · MIT · muend/geoai-skills