Cheap Tricks for Interaction
✓ Published1🌍 Public
This example shows a world map rendered with D3 v5 and TopoJSON, displaying country boundaries and names as tooltips. The map uses a natural Earth projection via `d3.geoPath` and `geoNaturalEarth1`, with countries filled in light green and a blue sphere background. Loading geographic data from the world-atlas package, the visualization adds a simple hover interaction: CSS changes the country fill to red on mouseover. Country names are joined to the geometry using ISO numeric codes from a TSV file and displayed via SVG `<title>` elements.
AI-generated descriptionMIT Licensed