World Countries Tree
✓ Published1🌍 Public
This example presents the hierarchical structure of world countries organized by continent and subregion as a tree diagram. The visualization uses a horizontal tree layout from D3 v5, with nodes representing geographic regions and countries, connected by curved links. Users can pan and zoom the entire structure through D3’s zoom behavior. The code builds the layout with `d3.tree`, `d3.hierarchy`, and `d3.linkHorizontal`, rendering text labels with font sizes that decrease with depth. Data is loaded from a local JSON file, and the SVG output features a custom serif font and distinct stroke color.
AI-generated descriptionMIT Licensed