Simple Circle Pack (d3 v4; CSV; 50 Lines)
✓ Published0🌍 Public
This circle packing visualization uses a hierarchical treemap-style layout to display car ownership data from a CSV file. It presents nested circles representing categories like "cars," "owned," and "traded," with leaf nodes sized according to their numerical values. The visualization uses d3.stratify() to build the hierarchy from the flat CSV, d3.hierarchy() with a sum aggregation to compute node sizes, and d3.pack() to calculate circle positions and radii. Fifty lines of code render the result as semi-transparent SVG circles with white strokes on a fixed 300×200 canvas.
AI-generated descriptionMIT Licensed