🌍 Public
Viewing a saved revision (read-only)
d7db1c8e5114465f879a8902cc0039a5
World Countries Tree
This example displays the hierarchical structure of world countries organized by continent and subregion, with all leaf nodes representing individual nations. The visualization uses a tree layout to position nodes and renders connecting links as horizontal paths, with the entire hierarchy branching from a central root labeled “World.” The code loads data from a JSON file using `d3.json`, applies the `d3.tree` layout to compute positions, and draws SVG path elements with `d3.linkHorizontal` for the edges. The resulting diagram, rendered through D3 v5, fills the browser viewport.
AI-generated description