Cheap Tricks for Interaction
✓ Published0🌍 Public
This example shows a world map rendered with a natural Earth projection, where countries are drawn as light green paths with a dark blue ocean background. Users can pan and zoom the map using a D3 zoom behavior, which applies a transform to the entire country group. The map data comes from the world-atlas TopoJSON and TSV files, processed with d3.geoPath and topojson.feature. Hovering over a country turns it red via CSS. The code explicitly uses d3.select, d3.json, d3.tsv, and d3.zoom to implement these interactions.
AI-generated descriptionMIT Licensed