🌍 Public
Viewing a saved revision (read-only)
34834d9fdcdf43ac9d11603d25af1d9d
Let's make a map with D3.js!
This example shows a world map rendered as an SVG, with countries filled in light green and the ocean (sphere) in powder blue. It uses D3.js's `geoNaturalEarth1` projection and `geoPath` to convert geographic data into SVG path strings. The map data comes from the `world-atlas` package, loaded as TopoJSON and converted to GeoJSON using the `topojson.feature()` function. The `svg.append` and `selectAll` methods are used to draw the sphere and country paths onto the canvas.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.