Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Cheap tricks for interactions

Public visualization

Cheap tricks for interactions

0 stars2🌍 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

Comments

Sign in to join the discussion.

MIT Licensed