🌍 Public
Viewing a saved revision (read-only)
1c8eca8648314e9681ae9c1a8260ebef
World Countries Tree
This example visualizes the hierarchical structure of world countries, organized by continent and subregion, as a horizontal tree layout. It uses D3 v5’s `tree` and `hierarchy` functions to compute node positions and `linkHorizontal` to draw curved links between parent and child nodes. The visualization renders text labels for each region and country directly in an SVG element, with zooming enabled via the `zoom` event. Node positions are scaled by depth, making higher-level categories appear larger and more prominent.
AI-generated description