Learn R Programming

treemap (version 1.0-3)

treemap-package: Treemap visualization

Description

ll{ Package: treemap Type: Package Version: 1.0-3 Date: 2012-03-30 License: GPL-3 LazyLoad: yes }

Arguments

Details

A treemap is a space-filling visualization of hierarchical structures. With this package different kind of treemaps can be generated, such as comparison treemaps and density treemaps. Small multiples are also supported. The function tmPlot is used to plot treemaps. The functions tmClick and tmLocate are used to respectively capture a mouse click on a treemap and locate the corresponding object.

References

http://www.cs.umd.edu/hcil/treemap-history{Shneiderman, B, Plaisant, C (2009) Treemaps for space-constrained visualization of hierarchies. Website} http://www.von-tijn.nl/tijn/research/publications/Top-down_data_analysis_with_Treemaps.pdf"{Tennekes, M., Jonge, E. de (2011) Top-down data analysis with treemaps. Proceedings of the International Conference on Information Visualization Theory and Applications, IVAPP 2011, Algarve, Portugal.}

Examples

Run this code
# fictive structural business statistics (sbs) data of 2008 and 2009
data(sbsData)

# comparisson treemap: colors indicate change of vSize with respect to vColor
tmPlot(sbsData, 
	   index=c("section", "subsection"), 
	   vSize="employees09", 
	   vColor="employees08",
	   type="comp")

# density treemap: colors indicate density (like a population density map)
tmPlot(sbsData,
	   index=c("section", "subsection"),
	   vSize="turnover09",
	   vColor="employees09*1000",
	   type="dens")

# value treemap (aka Map of the Market)
sbsData$employees.growth <- sbsData$employees09 - sbsData$employees08
tmPlot(sbsData, 
	   index=c("section", "subsection"), 
	   vSize="employees09", 
	   vColor="employees.growth", 
	   type="value")

Run the code above in your browser using DataLab