Cheap Tricks for Interaction
✓ Published0🌍 Public
This example shows an interactive world map colored by economic classification, with a categorical color legend. Users can pan and zoom the map using mouse or touch gestures, and hovering over a country highlights it and reveals its name and economic group via a tooltip. The visualization uses d3.geoNaturalEarth1 for projection, d3.geoPath for rendering GeoJSON features, and d3.zoom for interaction. d3.scaleOrdinal with schemeSpectral maps economic categories to colors, while the legend is custom-built from SVG elements.
AI-generated descriptionMIT Licensed