🌍 Public
Viewing a saved revision (read-only)
30dea58e3ec54be7b45d51b340824a51
Let's make a map with D3.js!
This example demonstrates how to create a world map using D3.js v5, rendering country boundaries as light green SVG paths on a blue sphere. It shows a natural Earth projection with subtle black stroke outlines for each country. The visualization loads GeoJSON data from the world-atlas TopoJSON file using `d3.json`, then converts it to geographic features with `topojson.feature`. The code applies `d3.geoPath` with a `geoNaturalEarth1` projection to draw both the sphere background and individual country shapes onto the SVG canvas.
AI-generated description