Skip to main content
100%

Map interaction with D3.js!

✓ Published0🌍 Public
Aaxliao
Last edited Jul 20, 2019
Created on Jul 20, 2019

This example demonstrates an interactive world map built with D3.js v5, allowing users to pan and zoom via the `d3.zoom` API. It renders country boundaries as SVG paths using `d3.geoPath` with a `geoNaturalEarth1` projection, applied to TopoJSON data from the world-atlas package. Country names are matched from a TSV file and displayed as tooltips via SVG `<title>` elements. Hovering changes the fill color through CSS, while the sphere background is styled as dark blue.

AI-generated description
MIT Licensed

Similar vizzes