Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Fork of Cheap Tricks for Interaction

Public visualization

Fork of Cheap Tricks for Interaction

0 stars0๐ŸŒ 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

Comments

Sign in to join the discussion.

MIT Licensed