🌍 Public
Viewing a saved revision (read-only)
7f0405cc50304bf594015ff317a1923d
sanky
This Sankey diagram visualizes the flow of production values from three economic sectors—Agriculture, Manufacturing, and Services—into Domestic Consumption and Exports. The code uses the `d3-sankey` library's `d3.sankey()` generator and `d3.sankeyLinkHorizontal()` function to compute node and link positions, rendered as SVG paths and rectangles. Node labels are positioned left or right based on their x-coordinate. The bundled React component initializes the D3 chart inside a `useEffect` hook and uses an ordinal color scale for node and link coloring.
AI-generated descriptionMIT Licensed