Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of World countries tree

Public visualization

Fork of World countries tree

1 star0🌍 Public
AAlex Velez
Last edited Oct 11, 2021
Created on Oct 11, 2021

This example presents a hierarchical tree of world countries, with nodes arranged using a cluster layout from D3 v5. The visualization uses data2.json to display branches for continents and regions, with leaf nodes styled as colored rectangles scaled by percentage values. D3's `d3.cluster()` and `d3.hierarchy()` arrange the tree structure, while `d3.scaleLinear()` maps data values to rectangle heights. Text elements list category names, percentages, and associated keywords for each leaf, all rendered as SVG. Zooming and panning are enabled via `d3.zoom()`.

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.

Comments

Sign in to join the discussion.

MIT Licensed