🌍 Public
Viewing a saved revision (read-only)
e0e9e4821d434a5f83498106f79c1209
Cheap Tricks for Interaction
This example shows an interactive world map where hovering over a country highlights it and clicking selects it, turning it red. The visualization uses the D3.js library, specifically `d3.geoNaturalEarth1` for the map projection and `d3.geoPath` for rendering country boundaries. It loads geographic data from the `world-atlas` package via `d3.json` and `d3.tsv`, using `topojson` to convert the TopoJSON features. The map supports zooming through the `d3.zoom` API, which dynamically transforms the SVG group containing the paths.
AI-generated description