Skip to main content
100%

Hover, Zoom on a Map

✓ Published2🌍 Public
Aannadehtiarova
Last edited Feb 1, 2021
Created on Feb 1, 2021

This example displays a world map using D3.js and topojson, rendered as an SVG with the geoNaturalEarth1 projection. It loads geographic data from the world-atlas package, including country boundaries and a TSV file mapping ISO codes to country names. Hovering over a country turns it red, and users can pan and zoom the map via the d3.zoom module, which updates the group’s transform attribute.

AI-generated description

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

MIT Licensed

Similar vizzes