Skip to main content
100%

TreeMap with a reset button to go back

✓ Published1🌍 Public
GGayan Priyadarshana
Last edited Aug 17, 2023
Created on Aug 17, 2023

This interactive D3.js treemap visualizes U.S. scrap metal export values by partner country and commodity, using an SVG rendering with clickable cells and animated transitions. The chart initially displays total export values per country as hierarchically sized rectangles, and clicking any country drills down to show its commodity-level breakdown. A reset button restores the view. The code uses `d3.csv` to load data, `d3.hierarchy` and `d3.treemap` for layout, and `transition()` for smooth updates, with data sourced from a CSV file.

AI-generated description
MIT Licensed

Similar vizzes