Skip to main content
100%

Fork of D3 Tree with Multiple Parents

✓ Published0🌍 Public
MM
Last edited Mar 29, 2024
Created on Mar 29, 2024

This visualization shows a tree diagram with multiple parent nodes, where the U.S. Government and Stock Market both branch into shared child categories like Supply and demand, Foreign worker, Government, and Laborer. The code uses D3 v5’s `d3.stratify` to convert a flat CSV dataset into a hierarchical structure, then applies `d3.tree` layout and `d3.linkHorizontal` to draw the curved links between nodes. Text labels display each node’s name, with font size decreasing by depth, rendered as SVG inside a zoomable `<g>` group controlled by `d3.zoom`. The data is loaded asynchronously from a remote CSV file.

AI-generated description
MIT Licensed

Similar vizzes