Skip to main content
100%

Map with selectable country

✓ Published0🌍 Public
NNita
Last edited Oct 24, 2018
Created on Oct 24, 2018

This example presents a world map with countries colored by economic category, where clicking a country highlights it and dims all others; clicking again deselects it. The visualization includes a color legend with clickable swatches that filter the map’s opacity. Built with D3 v5, it uses `d3.geoNaturalEarth1`, `d3.geoPath`, and `d3.zoom` for the interactive map, rendered as SVG. Country data comes from World Atlas TopoJSON, while economic classifications load from a TSV file. A sequential ordinal color scale based on `schemeSpectral` drives the fill colors.

AI-generated description
MIT Licensed

Similar vizzes