Skip to main content
100%

Let's make a map with D3.js!

✓ Published0🌍 Public
AAndrewTsai0406
Last edited Oct 2, 2020
Created on Sep 29, 2020

This example demonstrates how to create a world map using D3.js v5 and TopoJSON. It renders a natural Earth projection of countries as SVG paths, with a blue sphere background and green country fill. The code loads geospatial data from the world-atlas package, converts TopoJSON features using `topojson.feature`, and applies a `d3.geoPath` generator with `d3.geoNaturalEarth1` projection. The map is drawn by appending path elements to an SVG container, with styling defined in an external stylesheet.

AI-generated description
MIT Licensed

Similar vizzes