Map with Selectable Countries
✓ Published0🌍 Public
This example presents a world map colored by each country’s economy group using an ordinal color scale. Clicking a country highlights it while dimming all others, and clicking again deselects it; the accompanying color legend also supports filtering by clicking its swatches. Built with D3 v5, it uses `d3.geoNaturalEarth1` for projection, `d3.geoPath` for rendering SVG paths, `d3.zoom` for pan and zoom, and `d3.scaleOrdinal` with `schemeSpectral`. Country boundaries and metadata come from TopoJSON and TSV files loaded from the world-atlas package.
AI-generated descriptionMIT Licensed