Skip to main content
100%

Map with legends

✓ Published0🌍 Public
Ddankvader1
Last edited Jul 4, 2022
Created on Jul 3, 2022
Forked from Choropleth Map

This map visualizes countries colored by their economy category, with a color legend showing the ordinal scale’s domain. Built with d3.v5, it uses `d3.geoNaturalEarth1` projection and `d3.geoPath` to render world boundaries from TopoJSON data, while `d3.scaleOrdinal` maps economy values to a spectral color scheme. The legend, implemented via the custom `colorLegend` function, renders white-background ticks with circles and text labels, and the map supports zooming through d3.zoom. Data originates from world-atlas TSV and JSON files.

AI-generated description
MIT Licensed

Similar vizzes