Skip to main content
100%

Let's make a map with D3.js!

✓ Published1🌍 Public
Ppranatiyv
Last edited Apr 4, 2022
Created on Apr 4, 2022
Forked from HTML Starter

This example shows a choropleth-style world map rendered as SVG, with each country filled in blue and outlined with a subtle black stroke. Using the Natural Earth projection via `d3.geoNaturalEarth1` and `d3.geoPath`, it loads a TopoJSON dataset from the world-atlas package and converts it to GeoJSON with `topojson.feature`. The code then binds the country features to SVG path elements, relying on D3’s `select` and `json` methods to fetch and draw the geographic data.

AI-generated description
MIT Licensed

Similar vizzes