Cheap tricks for Interaction
✓ Published0🌍 Public
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 descriptionMIT Licensed