Skip to main content
100%

Cheap Tricks for Interaction

✓ Published0🌍 Public
ZZhengyan Yu
Last edited Apr 26, 2020
Created on Apr 25, 2020

This interactive globe displays world countries colored red, with a zoom and pan interface that transforms the map projection. The visualization merges country boundaries from the world-atlas TopoJSON dataset with demographic attributes joined from tabular TSV data, matching records by ISO country codes. Using d3.geoPath with the Natural Earth projection, the code renders SVG paths and enables hover tooltips showing country names via SVG `<title>` elements. The zoom interaction relies on d3.zoom's event system, updating the group's transform attribute. The globe's sphere is filled blue, while countries use a red fill with a distinct hover state.

AI-generated description
MIT Licensed

Similar vizzes