Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

World Countries Tree

Public visualization

World Countries Tree

0 stars0🌍 Public
CChristine Lanser
Last edited Oct 7, 2020
Created on Oct 7, 2020
Forked from Blank Canvas!

This visualization displays the hierarchical structure of world countries, organized by continent and subregion, as a tree layout. The code uses D3’s `tree()` layout with a `linkHorizontal` path generator to draw the connections, and the `hierarchy` function to parse the nested JSON data. Node labels are added as SVG text elements, with font size and anchor position varying by depth to distinguish parent regions from leaf countries. Pan and zoom interactions are enabled via `d3.zoom` and `event.transform`.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

Comments

Sign in to join the discussion.

MIT Licensed