🌍 Public
Viewing a saved revision (read-only)
f9e41317fc714034aaf5ee079ee484ca
Make a World Map
This example displays a world map rendered as SVG paths, with countries filled in light green and a dark blue sphere as the background. It uses D3 version 7’s `geoPath` and `geoNaturalEarth1` projection to generate the geographic shapes, while the `topojson` library’s `feature` function converts TopoJSON country boundaries from the world-atlas dataset into GeoJSON features. The code fetches the data from a remote URL and asynchronously appends the country paths to the SVG container.
AI-generated descriptionA demonstration of how to start using D3 version 6.