🌍 Public
Viewing a saved revision (read-only)
5e66a89609854549a9539563a3e0f2e8
Make a map with D3.js
This example visualizes world country boundaries as filled polygons on a natural Earth projection, rendered as SVG. It uses D3.js v5 with `d3.geoNaturalEarth1` for projection, `d3.geoPath` to generate the path data, and `topojson.feature` to convert TopoJSON country data from the world-atlas dataset. The ocean sphere is drawn first, followed by country shapes, with distinct fill colors for each. The map displays 110m-resolution country outlines loaded asynchronously via a JSON promise.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.