Radial Tree of Countries Hierarchy - Test
This example shows a radial tree layout of a hierarchical data structure, adapted from Curran Kelleher’s “World Countries Hierarchy” block. The code uses D3 v4’s `d3.cluster` and `d3.hierarchy` to compute node positions in a circle, then draws curved paths between parent and child nodes. Each node is rendered as an SVG text label, with font size scaled by depth via a `d3.scaleSqrt` transform. Panning and zooming interactions are enabled using D3’s `d3.zoom` behavior, which applies a transform to the SVG group. The data, a repeating set of object names and paths, is loaded from a local `data.json` file.
AI-generated descriptionRadial Tree Visualization of Countries Hierarchy. Has Panning and Zooming interaction.
Adapted from Curran Kelleher’s Block "World Countries Hierarchy".