Skip to main content
100%

Cheap Tricks for Interaction

✓ Published0🌍 Public
MMelina
Last edited Jun 15, 2020
Created on Jun 15, 2020

This example displays a world map using Natural Earth data via TopoJSON, projecting countries with the `geoNaturalEarth1` projection and rendering them as SVG paths through `d3.geoPath`. The map shows country names on hover through SVG `<title>` elements, populated from the world-atlas TSV file. The visualization implements cheap interaction by altering the fill color of countries when hovered, using a CSS `:hover` rule. The code loads data with `d3.tsv` and `d3.json`, and builds the map with `topojson.feature`.

AI-generated description
MIT Licensed

Similar vizzes