🌍 Public
Viewing a saved revision (read-only)
81cb4c4973154ad8852538dc61dd6963
Let's make a map with D3.js!
This example demonstrates how to create a simple world map using D3.js, displaying countries as light green polygons against a blue sphere background. The visualization uses the `geoNaturalEarth1` projection and `geoPath` to generate SVG paths from TopoJSON data loaded from the world-atlas dataset. The code relies on D3 v5 and the topojson library, specifically using the `feature` function to convert TopoJSON to GeoJSON. The map is rendered entirely with SVG elements, with the sphere outline drawn first, followed by the country boundaries.
AI-generated description