π Public
Viewing a saved revision (read-only)
1f745c71ea20493b8b2e41fbde0d4071
Circles on a Map
This example visualizes global population data by coloring each country on a world map based on its 2018 population estimate, with green indicating data availability and red for missing values. It uses D3 v5 with `geoNaturalEarth1` projection and `geoPath` to render the map, while `topojson.feature` converts the world-atlas TopoJSON data. The map supports zooming and panning through `d3.zoom`. A color legend, built with `scaleOrdinal` and `schemeSpectral`, is displayed alongside, and hovering over a country highlights it in red.
AI-generated description