Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

TreeMap with Tooltips

Public visualization

TreeMap with Tooltips

0 stars0๐ŸŒ Public
GGayan Priyadarshana
Last edited Aug 18, 2023
Created on Aug 18, 2023

This tree map displays US steel scrap exports by partner country and commodity type, with each rectangle sized according to trade value. The visualization supports drill-down interaction by clicking on a country to reveal its commodity breakdown, plus a reset button to return to the top level. Built with D3 v7, it uses `d3.hierarchy` and `d3.treemap` to compute the layout, renders SVG rectangles with native tooltips via the `title` element, and animates resizing through `transition`. Data comes from an external CSV file containing country, commodity, and value columns.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed