This is the JTreemap package---a clean-room implementation of the University of Maryland's treemap concept. The current version of JTreemap provides:
The next release of this application will run
"headless" so that treemaps can be generated from the
command line without needing a graphics display; for example,
from a cron job.
Treemaps are an innovative data visualization technique invented by Ben Schneidermann at the University of Maryland. Treemaps are is intended to be used with hierarchical data structures that can be aggregated. The core data elements of a treemap are nodes which, when rendered, appear as a patchwork of rectangles. Each node's area and chromatic brightness can be varied to show its importance relative to others.
Many of the early implementations of treemaps were designed to render relatively flat hierarchies of items. More recent versions (such as this implementation) support tree-like data structures. Because the number of data items in treemaps can often be quite large, JTreemap allows calling applications to set a "view node" so that only items under that node are shown on screen. In addition, calling applications can set a desired "view depth" so nodes that are "above" a given depth below the view node are rendered; all nodes below the view depth are aggregated into their parents. For example, a view depth of 2 indicates that the view node's child and grandchild nodes should be rendered, but that "deeper" descendant nodes (such as great-grandchild nodes) should be aggregated upwards.
To ensure that nodes are arranged sensibly and in a manner pleasing to the eye, treemaps typically support one or more layout algorithms. The first algorithm, originally developed by the Univerity of Maryland, is the "strip" layout. However, at present prevailing consensus holds that J.J. van Wijk's "squarified" layout algorithm provides the best balance of structural fidelity and aesthetics. Accordingly, this package provides an implemetation of the squarified algorithm.
With respect to aesthetics, JTreemap is pattered after Marcos Weskamp's brilliant Flash-based Newsmap application.
Using the Freshcookies Treemap package is simple. Download the runtime JAR, then execute the following command:
java -jar freshcookies-treemap-0.x.jar -depth=viewdepth filename
Here is a sample treemap generated for the ISO 17799 security framework, using a view depth of 2:
Complete documentation on the command-line syntax and expected tab-delimited file format can be found in the entry for the TreemapFileParser class in the Javadocs. The source tarball containing code and sample tab-delimited files is here.