Cheap Tricks for Interaction
✓ Published0🌍 Public
This example displays an interactive world map that zooms and pans using a spinning globe metaphor. The visualization uses a D3 geo projection with d3.geoNaturalEarth1, rendered through d3.geoPath onto an SVG canvas. A dark blue sphere underlies light green country polygons with black outlines, which turn red on hover. Country names appear as tooltips, sourced from a world-atlas TSV file. The map’s zoom and pan interactions are handled by a custom d3.zoom function, with a topojson feature conversion for geographic data. The transformation updates the SVG group’s coordinates in response to user gestures.
AI-generated descriptionMIT Licensed