🌍 Public
Viewing a saved revision (read-only)
f557cc24056f4a62856cac7cc065c6d9
Let's make a map with D3.js!
This example shows how to create a world map using D3.js, rendering geographic features as SVG paths. It loads TopoJSON data from a remote URL and converts it to GeoJSON using the `feature` function from Topojson. The map uses a `geoNaturalEarth1` projection with a `geoPath` generator to draw each country boundary. The code imports specific D3 modules such as `select`, `json`, and `geoPath`, and appends path elements to an SVG canvas with a width of 960 and height of 500.
AI-generated description