Cheap Tricks for Interaction
✓ Published0🌍 Public
This example shows a world map rendered with D3’s `geoNaturalEarth1` projection and `geoPath`, where each country is colored green and turns yellow on hover. Users can pan and zoom the entire map via D3’s `zoom` behavior, which applies an SVG transform to a group element. The map data comes from World Atlas TopoJSON (50m), with country names matched from a TSV file and displayed as native SVG `<title>` tooltips. Styling is handled through CSS classes, with the sphere filled in blue.
AI-generated descriptionMIT Licensed