Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Cheap Tricks for Interaction

Public visualization

Viewing a saved revision (read-only)

30bfbb237883478db0092c1c5f49953f

Fork of Cheap Tricks for Interaction

0 stars0🌍 Public
Kkindermannhannah
Last edited Dec 3, 2022
Created on Dec 3, 2022

This example shows an interactive world map built with D3.js, where hovering over any country turns it red and displays its name as a tooltip. The visualization renders a geo-projection sphere and country boundaries as SVG paths, using the `d3.geoNaturalEarth1` projection and `d3.geoPath` to generate the map geometry. The globe can be zoomed and panned via the `d3.zoom` API, which applies a transform to the grouped map elements. Country names come from a TSV data file joined with GeoJSON topology from the world-atlas package, processed with the topojson `feature` function.

AI-generated description