Skip to main content
100%

Cheap Tricks for Interaction

✓ Published1🌍 Public
LLeoBergqvist
Last edited Feb 21, 2020
Created on Feb 21, 2020

This interactive map uses a natural Earth projection with D3’s `geoPath` and `geoNaturalEarth1` to color countries by economic classification, employing a spectral `scaleOrdinal` and a custom color legend with circles and text. Zooming is enabled via `d3.zoom`, while hovering highlights countries in red through CSS. World map geometry comes from TopoJSON’s `world-atlas`, enriched with metadata from a TSV file. The example demonstrates simple, reusable interaction patterns—tooltips via SVG `<title>` elements and a hover effect—without complex brushing or transitions.

AI-generated description
MIT Licensed

Similar vizzes