Map with Selectable Countries
✓ Published0🌍 Public
Jjlspangl
Last edited Oct 20, 2021
Created on Oct 20, 2021
Forked from Choropleth Map with Interactive Filtering
This example shows a choropleth map where clicking a country highlights it and dims all others, with a color legend on the side. It uses the d3.geoPath and d3.geoNaturalEarth1 projections to render the world map, while d3.scaleOrdinal and d3.schemeSpectral define the color encoding. Country data comes from world-atlas TSV and TopoJSON files, and interactions trigger re-rendering with updated opacity and stroke styles. The map supports zooming via d3.zoom.
AI-generated descriptionA choropleth map with selectable countries
MIT Licensed