Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Cheap Tricks for Interaction

Public visualization

Viewing a saved revision (read-only)

eb13bf47bf2646d1bb0afbcfa2ba629c

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