🌍 Public
Viewing a saved revision (read-only)
5b74ab4b1ed248a19462180e244474f6
Let's make a map with D3.js!
This example demonstrates how to create a world map using D3.js v5 and TopoJSON. It renders a natural Earth projection of countries as SVG paths, with a blue sphere background and green country fill. The code loads geospatial data from the world-atlas package, converts TopoJSON features using `topojson.feature`, and applies a `d3.geoPath` generator with `d3.geoNaturalEarth1` projection. The map is drawn by appending path elements to an SVG container, with styling defined in an external stylesheet.
AI-generated description