Making Maps
✓ Published0🌍 Public
This example shows a choropleth world map where a small set of countries are shaded from light blue to dark blue according to their population in millions, taken from an inline data array. It uses D3 v7, TopoJSON’s `feature` function, a `d3.scaleLinear` color scale, and `d3.geoNaturalEarth1` projection with `d3.geoPath` to render countries from the world-atlas dataset as SVG paths. The map displays tooltips with each country’s name and population or “n/a” for unlisted countries.
AI-generated descriptionMIT Licensed