Skip to main content
100%

Fork of Cheap tricks for interaction

✓ Published0🌍 Public
MMajaha21
Last edited Apr 26, 2021
Created on Apr 26, 2021
Forked from Choropleth Map

This example shows a world map rendered with SVG paths that change color on hover. It demonstrates basic DOM manipulation and interaction using D3.js, with a natural Earth projection and zoom behavior. The code loads world atlas TopoJSON and TSV data from unpkg, converts the TopoJSON to GeoJSON using `topojson.feature`, and uses `d3.geoPath` for rendering. Zooming is handled via `d3.zoom`, and country names appear as SVG `<title>` tooltips.

AI-generated description

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

MIT Licensed

Similar vizzes