Skip to main content
100%

World Countries

✓ Published0🌍 Public
RRealAlpha
Last edited Apr 17, 2021
Created on Apr 15, 2021
Forked from Hello VizHub

This example presents the hierarchical structure of world countries as an interactive zoomable tree diagram. The visualization organizes countries by continent and subregion, revealing geographic groupings at a glance. Using D3.js v5, the code loads data from a JSON file and applies the `d3.tree()` layout with `d3.hierarchy()`, rendering horizontal links via `d3.linkHorizontal()`. Pan and zoom functionality is implemented with the `d3.zoom()` behavior, while text labels display country names with size scaling by depth. The SVG-based rendering allows smooth exploration of the global hierarchy.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes