🌍 Public
Viewing a saved revision (read-only)
607eb23ca5b64829bd57c3ab8d6a0e6f
Choropleth Map Zia1
This example presents a choropleth map of global economies, coloring each country using a categorical ordinal scale and the spectral color scheme. It displays the map with a natural Earth projection and applies zoom interactions to the SVG. A custom legend visualizes the color categories with circles and labels. The code uses d3.geoPath, d3.geoNaturalEarth1, d3.zoom, and d3.scaleOrdinal, loading TopoJSON and TSV data from the world-atlas package. Hovering a country highlights it in red, and a title tooltip reveals the country name and economy type.
AI-generated description