Skip to main content
100%

Fork of Cheap Tricks for Interaction

✓ Published0🌍 Public
IIan Mac Moore
Last edited Jan 7, 2024
Created on Jan 7, 2024

This example shows an interactive world map that highlights countries in red on hover, with a blue ocean background. The visualization uses the `d3.geoNaturalEarth1` projection and `d3.geoPath` to render country boundaries from TopoJSON data, while a separate TSV file provides country names for tooltips. The map supports zooming and panning through the `d3.zoom` interaction module, which applies transform updates to the SVG group containing the paths. Countries are styled with CSS classes, and hover effects change their fill color using the `.country:hover` selector.

AI-generated description
MIT Licensed

Similar vizzes