Cheap Tricks for Interaction
✓ Published2🌍 Public
This example presents an interactive world map built with D3.js version 5 and TopoJSON, using a natural Earth projection rendered as SVG. It displays country boundaries from the world-atlas dataset, with hover states that highlight each nation in red and tooltips showing country names via SVG title elements. The visualization implements d3.zoom for pan and zoom interactions, applying transformations to a group element containing all geographic paths. The sphere background uses a distinct blue fill, while the code loads both TSV metadata for country names and TopoJSON geometry through Promise.all.
AI-generated descriptionMIT Licensed