Skip to main content
100%

Let's make a map with D3.js!

✓ Published0🌍 Public
KKarkG
Last edited Aug 5, 2020
Created on Aug 5, 2020

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 description
MIT Licensed

Similar vizzes