Skip to main content
100%

Cheap tricks for interactions

✓ Published2🌍 Public
ZZ-Richard
Last edited Jun 17, 2020
Created on Jun 17, 2020

This example shows an interactive world map with country boundaries, rendered using the Natural Earth projection via `d3.geoNaturalEarth1` and `d3.geoPath`. Users can zoom and pan the map with the mouse, as the code applies `d3.zoom` to the SVG container and updates a group’s `transform` attribute on each zoom event. Country names appear as tooltips when hovering, populated from a TSV file that maps ISO numeric codes to names, while the underlying geometry comes from a TopoJSON file loaded via `topojson.feature`. The map uses filled paths with hover color changes defined in CSS.

AI-generated description
MIT Licensed

Similar vizzes