Skip to main content
100%

Let's make a map with D3.js!

✓ Published0🌍 Public
ZZhi Guangda
Last edited Jul 22, 2019
Created on Jul 22, 2019

This example shows a world map rendered as an SVG using D3.js, with countries filled in light green and a blue sphere for the globe. It uses the `geoNaturalEarth1` projection and `geoPath` to draw country boundaries from TopoJSON data loaded from the `world-atlas` package. The code demonstrates basic data joining: it fetches the dataset with `json`, converts TopoJSON features using `feature`, and appends a `path` element for each country. The map fully occupies the viewport with hidden page overflow.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

MIT Licensed

Similar vizzes