Skip to main content
100%

World Countries Hierarchy

✓ Published0🌍 Public
Bbprokopowicz
Last edited Mar 31, 2020
Created on Mar 31, 2020
Forked from Blank Canvas

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 description

D3 course follow along.

MIT Licensed

Similar vizzes