Enclosure diagrams reveal the topology of a hierarchy through containment. Circle packing places leaf nodes in circles, which represent subtrees. Their cumulative size determines the size of the enclosing circle, but the use of space in this type of chart is not very efficient. Treemaps use rectangles instead of circles and are more space-efficient. They also allow areas to be compared with more precision, but circle packing is usually better at emphasizing topology.
The following diagrams show the same data rendered with circle packing and treemap layouts. The full code and the data files used to generate these charts are available from the GitHub repository for this chapter:
A treemap visualization is shown below. It uses exactly the same...