World Countries Hierarchy
✓ Published0🌍 Public
This example visualizes the hierarchical relationships between world regions, subregions, and countries using a tree layout. The code employs `d3.hierarchy`, `d3.tree`, and `d3.linkHorizontal` to compute and draw the node links as SVG paths. Text labels are positioned according to tree depth, with font size decreasing for deeper levels, and `d3.zoom` enables panning and zooming. The data structure in `data.json` organizes countries under continents and subregions, rendered with a white text shadow for readability.
AI-generated descriptionD3 course follow along.
MIT Licensed