Skip to main content
100%

Node-link world countries tree viz

✓ Published0🌍 Public
JJames Malvern
Last edited Mar 22, 2021
Created on Mar 22, 2021
Forked from Blank canvas

This visualization displays a hierarchical tree of world countries, organized by continent and subregion, with each country name rendered as a text label. The layout uses a left-to-right node-link tree structure, where parent nodes represent geographic groupings and leaf nodes represent individual countries. The code uses d3-hierarchy's `tree` and `hierarchy` functions to compute the layout, `linkHorizontal` to draw curved edges, and SVG text elements with depth-scaled font sizes. Data comes from a JSON file containing nested world country groupings, and zooming is enabled via d3.zoom.

AI-generated description

Tree vizualisation of world countries

The top-level object is known as the root node, with children property underneath it (i.e. world and countries). The data object has a children object.

Uses the d3-hierarchy package and a JSON data file with world countries in it.

MIT Licensed

Similar vizzes