Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Cheap Tricks for Interaction

Public visualization

Cheap Tricks for Interaction

0 stars0🌍 Public
Vveagy
Last edited Nov 1, 2018
Created on Sep 26, 2018

This example shows an interactive world map where hovering over a country highlights it and clicking selects it, turning it red. The visualization uses the D3.js library, specifically `d3.geoNaturalEarth1` for the map projection and `d3.geoPath` for rendering country boundaries. It loads geographic data from the `world-atlas` package via `d3.json` and `d3.tsv`, using `topojson` to convert the TopoJSON features. The map supports zooming through the `d3.zoom` API, which dynamically transforms the SVG group containing the paths.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed