🌍 Public
Viewing a saved revision (read-only)
6a53fe9b4a0641e2834aca7e34aa0b25
Let's make a world map with D3.js!
This example shows a world map rendered as an SVG, with countries drawn as filled paths and an ocean background. It uses D3.js v5 with the `geoNaturalEarth1` projection and `geoPath` to generate the geographic shapes. Country boundaries come from the TopoJSON `world-atlas` dataset, loaded via the `json` method and converted with `topojson.feature`. The code appends each country as a separate `path` element, styled with a brown fill and black stroke.
AI-generated description