Fork of Cheap Tricks for Interaction
✓ Published0🌍 Public
This example displays a world map of countries colored light green on a blue sphere, using CSV data from happiness rankings to label each country. It demonstrates pan and zoom interactions built with D3 v5’s `zoom` API and `event.transform`, which applies transforms to the SVG group containing the map. Country boundaries are rendered via `d3.geoPath` with a `geoNaturalEarth1` projection, and topojson data from the world-atlas package supplies the geographic features. Hovering over a country turns it red through CSS `:hover` styling, while tooltips show the country name from the happiness dataset.
AI-generated descriptionMIT Licensed