🌍 Public
Viewing a saved revision (read-only)
41804c1d8b54485d878f886bea0e5afc
Let's make a map with D3.js!
This example shows a world map rendered as SVG paths, with countries filled in light green and a blue sphere representing the globe. The map uses the Natural Earth dataset from the world-atlas package, loaded as TopoJSON and converted into geographic features via the `topojson` library. The code projects these features using D3’s `geoNaturalEarth1` projection and draws them with `geoPath`. The sphere background is created by passing a `{ type: 'Sphere' }` object to the same path generator, and styling is applied via CSS classes.
AI-generated description