Skip to main content
100%

Let's make a map with D3.js!

✓ Published0🌍 Public
TTallulah Kay
Last edited Apr 28, 2019
Created on Apr 28, 2019

This example demonstrates how to create a world map using D3.js. It renders a natural Earth projection of countries as SVG paths, filled with light green and outlined with a subtle black stroke, all set against a blue sphere background. The code uses `d3.json` to load geographic data from the world-atlas TopoJSON file, then converts it to GeoJSON with `topojson.feature`. The map is drawn using `d3.geoPath` and the `geoNaturalEarth1` projection, with the sphere added as a separate path.

AI-generated description
MIT Licensed

Similar vizzes