🌍 Public
Viewing a saved revision (read-only)
4878562f57434d34a22cb21744e78822
Cheap tricks for Interaction
This example demonstrates a world map with smooth zoom and pan interaction, achieved using D3 v5’s `zoom` behavior. Hovering over countries highlights them in red, while the base map renders with a blue sphere outline and a green country fill. The visualization uses `d3.geoNaturalEarth1` for the projection and `d3.geoPath` to draw geometries from TopoJSON world-atlas data, with country names loaded from a TSV file and attached as `title` tooltips. The zoom transform is applied to a group element containing all map paths.
AI-generated description