Skip to main content
100%

Making a map with D3.js!

✓ Published0🌍 Public
OOliver Wills
Last edited Jun 19, 2020
Created on Jun 19, 2020

This example uses D3.js to render a world map from the world-atlas dataset. The visualization draws all countries as green SVG paths with a black stroke on a steelblue background, using a Mercator projection. The code leverages `d3.geoPath` with `d3.geoMercator` to generate the geographic outlines, and the `topojson` library’s `feature` function to convert TopoJSON data into GeoJSON features. A single path for the entire sphere is added first, followed by individual country paths.

AI-generated description

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

MIT Licensed

Similar vizzes