Let's make a map with D3.js!
✓ Published0🌍 Public
This example shows a world map rendered as a colored sphere with light-green countries outlined in black, using an SVG canvas. The code builds the visualization with D3 v5 and TopoJSON, fetching geographic data from the world-atlas package. It applies a natural Earth projection via `d3.geoNaturalEarth1`, generates paths with `d3.geoPath`, and converts TopoJSON topology to GeoJSON features using the `feature` function. The sphere itself is drawn as a single path with a blue fill, while country boundaries use a thin stroke.
AI-generated descriptionMIT Licensed