About Treemaps

Almost every PC user will be familiar with Windows explorer, which is a tool for browsing file hierarchies on a computer system. Explorer displays the contents of any given directory as a list where the indentation indicates the level in the hierarchy. Users can thus explore the contents of their file system on directory at a time, which works well in practice. A major drawback of this method however, is that the user cannot obtain a global overview of the entire contents of his disk, because the number of files and directories that can be shown simultaneously is limited by the available screen space. Without a global overview of the entire file system questions like "Which directory is taking up most of my hard disk space?" or "Why is my disk full?" are hard to answer.

Treemaps, developed by Shneiderman and Johnson in the late 1980's (article here), present an elegant solution to this problem by making more efficient use of the available screen space. Instead of showing a file system as a long list of files and directories, files are displayed as rectangles, with the size of the rectangle being proportional to the size of the file. We can then display more information at once if we use all available space. We will illustrate this method with a small example:


1. Suppose we have a file system consisting of three directories and six files. This picture shows an Explorer Style view.
2. To create a treemap we first assign one rectangle to represent the entire disk.
3. We now horizontally subdivide this rectangle into two rectangles representing the directories directly below the root. Dir 1 is assigned 30% of the space (3 out of a total of 10 Mb).
4. We repeat the previous step using the rectangle of Dir 1 and a vertical subdivision. File 1 is assigned one third of the rectangle.
5. Subdivision of the rectangle of Dir 2 can be done in a similar manner.
6. Files in Dir 3 are added, using horizontal subdivision again. The resulting treemap displays all files in a single image, making it easy to determine the largest ones.