Skip to main content
100%

Cheap Tricks for Interaction

✓ Published0🌍 Public
Ggcappadaniel
Last edited Jun 1, 2020
Created on Jun 1, 2020

This example displays a world map colored by each country’s economy category, using a natural Earth projection and D3’s `geoPath`. A hover effect highlights individual countries in red, while `d3.zoom` enables pan and zoom interactions that transform the entire map group. The map is rendered as SVG, with data loaded from the World Atlas TopoJSON and TSV files, and country names appear via native `<title>` tooltips. The code uses `scaleOrdinal` with `schemeCategory10` for the color scale and topojson’s `feature` method for geometry.

AI-generated description
MIT Licensed

Similar vizzes