Package treemap. February 15, 2013



Similar documents
Package treemap. October 14, 2015

Treemaps for Search-Tree Visualization

TOP-DOWN DATA ANALYSIS WITH TREEMAPS

Ordered Treemap Layouts

HierarchyMap: A Novel Approach to Treemap Visualization of Hierarchical Data

Package tagcloud. R topics documented: July 3, 2015

Agenda. TreeMaps. What is a Treemap? Basics

Hierarchical Data Visualization. Ai Nakatani IAT 814 February 21, 2007

Package retrosheet. April 13, 2015

Package empiricalfdr.deseq2

Package plan. R topics documented: February 20, 2015

Package MBA. February 19, Index 7. Canopy LIDAR data

Regular TreeMap Layouts for Visual Analysis of Hierarchical Data

Cascaded Treemaps: Examining the Visibility and Stability of Structure in Treemaps

Visualizing Large Graphs with Compound-Fisheye Views and Treemaps

Treemap Presentation as a Corporate Dashboard Larry Day & Richard Dickinson Corporate Performance Measures BNSF Railway

Package missforest. February 20, 2015

A Note on Space-Filling Visualizations and Space-Filling Curves

Squarified Treemaps. Mark Bruls, Kees Huizing, and Jarke J. van Wijk

TREE-MAP: A VISUALIZATION TOOL FOR LARGE DATA

Project Portfolio Earned Value Management Using Treemaps. University of Maryland, College Park, Maryland. 1 Introduction

Data Visualisation and Its Application in Official Statistics. Olivia Or Census and Statistics Department, Hong Kong, China

Package neuralnet. February 20, 2015

Package wordcloud. R topics documented: February 20, 2015

Package HadoopStreaming

Cabinet Tree: An Orthogonal Enclosure Approach to Visualizing and Exploring Big Data

Package bigdata. R topics documented: February 19, 2015

Visualization Techniques in Data Mining

Package sendmailr. February 20, 2015

Package erp.easy. September 26, 2015

Package hoarder. June 30, 2015

Package pmr. May 15, 2015

Package sjdbc. R topics documented: February 20, 2015

Interactive Visual Analysis of the NSF Funding Information

Space-filling Techniques in Visualizing Output from Computer Based Economic Models

Package optirum. December 31, 2015

Package SHELF. February 5, 2016

SAS VISUAL ANALYTICS AN OVERVIEW OF POWERFUL DISCOVERY, ANALYSIS AND REPORTING

KaleidaGraph Quick Start Guide

Effective Visualization of File System Access-Control

Cabinet Tree: an orthogonal enclosure approach to visualizing and exploring big data

Package TSfame. February 15, 2013

Package differ. R topics documented: February 19, Type Package

Excel 2010: Create your first spreadsheet

Access Tutorial 3 Maintaining and Querying a Database. Microsoft Office 2013 Enhanced

Tutorial 3 Maintaining and Querying a Database

Treemap Visualization for Space Situational Awareness

Package cgdsr. August 27, 2015

TECHNICAL REPORT. Extending Tree-Maps to Three Dimensions A Comparative Study. Thomas Bladh, David A. Carr, Jeremiah Scholl.

CREATING EXCEL PIVOT TABLES AND PIVOT CHARTS FOR LIBRARY QUESTIONNAIRE RESULTS

TIBCO Spotfire Business Author Essentials Quick Reference Guide. Table of contents:

The ICE-Map Visualization

Graphical representation of the comprehensive patient flow through the Hospital

MICROSOFT OUTLOOK 2010 WORK WITH CONTACTS

Visualizing Changes of Hierarchical Data using Treemaps

Package bigrf. February 19, 2015

Microsoft Excel 2010 Part 3: Advanced Excel

R Graphics Cookbook. Chang O'REILLY. Winston. Tokyo. Beijing Cambridge. Farnham Koln Sebastopol

Tutorial 3: Working with Tables Joining Multiple Databases in ArcGIS

Package survpresmooth

Data Visualization. Brief Overview of ArcMap

Cluster Analysis using R

Package hazus. February 20, 2015

Creating a Newsletter with Microsoft Word

Dreamweaver and Fireworks MX Integration Brian Hogan

Kit Rowley. Subject: Content type and workflow planning (SharePoint Server 2010) Attachments: image001.gif. Plan content types. Plan content types

Formulas, Functions and Charts

Package ggrepel. February 8, 2016

7. Hierarchies & Trees Visualizing topological relations

University of Arkansas Libraries ArcGIS Desktop Tutorial. Section 2: Manipulating Display Parameters in ArcMap. Symbolizing Features and Rasters:

LECTURE -08 INTRODUCTION TO PRIMAVERA PROJECT PLANNER (P6)

Petrel TIPS&TRICKS from SCM

Creating a Gradebook in Excel

MICROSOFT OFFICE ACCESS NEW FEATURES

Package uptimerobot. October 22, 2015

Hierarchical Data Visualization

Package HHG. July 14, 2015

Module One: Getting Started Opening Outlook Setting Up Outlook for the First Time Understanding the Interface...

Package fimport. February 19, 2015

Package ChannelAttribution

Tutorial 3. Maintaining and Querying a Database

Microsoft Office 2010

Data Visualization. Prepared by Francisco Olivera, Ph.D., Srikanth Koka Department of Civil Engineering Texas A&M University February 2004

Release Notes Assistance PSA 2015 Summer Release

Hierarchy and Tree Visualization

Package biganalytics

Intellect Platform - The Workflow Engine Basic HelpDesk Troubleticket System - A102

Excel Unit 4. Data files needed to complete these exercises will be found on the S: drive>410>student>computer Technology>Excel>Unit 4

Transcription:

Type Package Title Treemap visualization Version 1.1-1 Date 2012-07-10 Author Martijn Tennekes Package treemap February 15, 2013 Maintainer Martijn Tennekes <mtennekes@gmail.com> 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. License GPL-3 LazyLoad yes Depends grid, RColorBrewer, data.table Collate basetreemap.r cat2col.r comp2col.r createrec.r datasets.r dens2col.r drawlegend.r index2col.r linked2c Repository CRAN Date/Publication 2012-07-10 11:05:40 NeedsCompilation no R topics documented: treemap-package...................................... 2 GNI2010.......................................... 3 sbsdata........................................... 3 tmclick........................................... 3 tmlocate.......................................... 4 tmplot............................................ 4 Index 11 1

2 treemap-package treemap-package Treemap visualization Package: treemap Type: Package Version: 1.1-1 Date: 2012-07-10 License: GPL-3 LazyLoad: yes 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. Author(s) Martijn Tennekes <mtennekes@gmail.com> References Shneiderman, B, Plaisant, C (2009) Treemaps for space-constrained visualization of hierarchies. Website 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 # load Gross national income data data(gni2010) # create treemap tmplot(gni2010, index=c("continent", "iso3"), vsize="population", vcolor="gni", type="value")

GNI2010 3 GNI2010 GNI 2010 Data Gross national income (per capita) in dollars per country in 2010. References Website of The World Bank - Health Nutrition and Population Statistics sbsdata Structural Business Statistics Data Fictive structural business statistics data of 2008 and 2009. tmclick Mouse capture Captures a mouse click and convert it to npc coordinates. Such coordinates are needed for tmlocate Usage tmclick()

4 tmplot tmlocate Returns info about clicked rectangle This function returns information about the object on which user has clicked. Usage tmlocate(npcclick, tmsave) Arguments npcclick tmsave mouse click in npc coordinates, which can be generated by tmclick treemap information: value returned by tmplot Examples data(sbsdata) ## Not run: tmsave <- vsize=c("employees09", "value added09", "turnover09", "salaries09"), vcolor=c("employees08", "value added08", "turnover08", "salaries08"), type="comp") # capture mouseclick npcclick <- tmclick() # locate clicked object print(tmlocate(npcclick, tmsave)) ## End(Not run) tmplot Create treemap Create treemap

tmplot 5 Usage tmplot(dtf, index, vsize, vcolor = NULL, type = "value", title = NA, subtitle = NA, algorithm = "pivotsize", sortid = "-size", palette = NA, range = NA, vcolorrange = NULL, fontsize.title = 14, fontsize.labels = 11, fontsize.legend = 12, lowerbound.cex.labels = 0.4, inflate.labels = FALSE, bg.labels = ifelse(type %in% c("value", "linked", "categorical"), "#CCCCCCAA", NA), force.print.labels = FALSE, position.legend = ifelse(type %in% c("categorical", "index"), "right", ifelse(type == "linked", aspratio = NA, na.rm = FALSE) Arguments dtf index vsize vcolor type title subtitle algorithm a data.frame. Required. vector containing the column names in dtf that contain the aggregation indices. Required. name of the variable that determines the sizes of the rectangles. For small multiples, a vector of variable names (one for each treemap) should be given. Required. name of the variable that, in combination with type, determines the colors of the rectangles. The variable can be scaled by the addition of "*<scale factor>" or "/<scale factor>". For small multiples, a vector of variable names (one for each treemap) should be given. the type of the treemap: "value": the vcolor-variable is directly mapped to a color palette (by default Brewer s diverging color palette "RdBu"). "comp": colors indicate change of the vsize-variable with respect to the vcolorvariable in percentages. Note: the negative scale may be different from the positive scale in order to compensate for the ratio distribution. "dens": colors indicate density. This is aanalogous to a population density map where vsize-values are area sizes, vcolor-values are populations per area, and colors are computed as densities (i.e.\ population per squared km s). "linked": each object has a distinct color, which can be useful for small multiples (objects are linked by color) "index": each aggregation level (defined by index) has a distinct color "categorical": vcolor is a categorical variable that determines the color title of the treemap. For small multiples, a vector of titles should be given. Titles are used to describe the sizes of the rectangles. subtitle of the treemap. For small multiples, a vector of subtitles should be given. Subtitles are used to describe the colors of the rectangles. name of the used algorithm: "squarified" or "pivotsize". The squarified treemap algorithm (Bruls et al., 2000) produces good aspect ratios, but ignores the sorting order of the rectangles (sortid). The ordered treemap, pivot-by-size, algorithm (Bederson et al., 2002) takes the sorting order (sortid) into account while aspect ratios are still acceptable.

6 tmplot Value sortid palette range vcolorrange name of the variable that determines the order in which the rectangles are placed from top left to bottom right. Also the values "size" and "color" can be used. To inverse the sorting order, use "-" in the prefix. By default, large rectangles are placed top left. For small multiples, a vector of variable names (one for each treemap) can be given. Only applicable when algortihm=="pivotsize". either a color palette or a name of a Brewer palette (see display.brewer.all()). A Brewer palette can be reversed by prefixing its name with a "-". range of values that determine the colors. When omitted, the range of actual values is used. This range is mapped to palette. deprecated, use range instead. fontsize.title (maximum) font size of the title fontsize.labels font size(s) of the data labels, which can be: one number, which specifies the font size for all aggregation levels vector of two numbers, which specific the font sizes for 1) the highest and 2) the other aggregation levels vector of three numbers, which specific the font sizes for 1) the highest, 2) any in-between, and 3) the lowest aggregation level. fontsize.legend (maximum) font size of the legend lowerbound.cex.labels multiplier between 0 and 1 that sets the lowerbound for the data label font sizes: 0 means draw all data labels, and 1 means only draw data labels if they fit at fontsize.data. inflate.labels logical that determines whether data labels are inflated inside the rectangles. bg.labels background color of labels of high aggregation levels. If set to NA, the color is determined by the color of the underlying rectangle. For value, categorical and linked treemaps, the default is transparent grey ("#CCCCCCAA"), and for the other types, NA. force.print.labels logical that determines whether data labels are being forced to be printed (also when they don t fit). position.legend position of the legend: "bottom", "right", or "none". For categorical and index treemaps, "right" is the default value, for linked treemap, "none", and for the other types, "bottom". aspratio na.rm A list is silently returned: preferred aspect ratio of the main rectangle, defined by width/height. When set to NA, the available window size is used. logical that determines whether missing values are omitted during aggregation tm list with for each treemap a data.frame containing information about the rectangles

tmplot 7 nrow ncol vsize vcolor number of rows in the treemap grid number of rows in the treemap grid argument vsize argument vcolor This list can be used to locate a mouse click (see tmlocate). References Bederson, B., Shneiderman, B., Wattenberg, M. (2002) Ordered and Quantum Treemaps: Making Effective Use of 2D Space to Display Hierarchies. ACM Transactions on Graphics, 21(4): 833-854. Bruls, D.M., C. Huizing, J.J. van Wijk. Squarified Treemaps. In: W. de Leeuw, R. van Liere (eds.), Data Visualization 2000, Proceedings of the joint Eurographics and IEEE TCVG Symposium on Visualization, 2000, Springer, Vienna, p. 33-42. Examples ### quick example ### ### data: Gross national income data # load Gross national income data data(gni2010) # create treemap tmplot(gni2010, index=c("continent", "iso3"), vsize="population", vcolor="gni", type="value") ### extended examples ### ### data: fictive structural business statistics data ### load fictive structural business statistics data data(sbsdata) sbsdata$employees.growth <- sbsdata$employees09 - sbsdata$employees08 ### types # value treemap: the color variable is directly mapped to the colors

8 tmplot vcolor="employees.growth", type="value") # comparisson treemaps: colors indicate change of vsize with respect to vcolor vcolor="employees08", type="comp") # four comparisson treemaps vsize=c("employees09", "value added09", "turnover09", "salaries09"), vcolor=c("employees08", "value added08", "turnover08", "salaries08"), type="comp") # density treemaps: colors indicate density (like a population density map) vsize="turnover09", vcolor="employees09*1000", type="dens") vcolor="turnover09", type="dens") # linked treemaps: objects are linked by color over different treemaps tmplot(sbsdata[sbsdata$section=="manufacturing",], index="subsection", vsize=c("income09", "employees09", "expenditures09", "salaries09"), type="linked") # index treemap: each aggregation index has distinct color type="index") # categorical treemap: colors are determined by a categorical variable vcolor="section", type="categorical")

tmplot 9 ### layout algorithm vcolor="employees.growth", type="value", algorithm="squarified") ### graphical options: fontsize # draw labels at fixed fontsize (fit only) vcolor="employees08", type="comp", fontsize.labels=12, lowerbound.cex.labels=1) # draw labels at flexible fontsize (skip tiny rectangles) vcolor="employees08", type="comp", fontsize.labels=12, lowerbound.cex.labels=.6) # draw labels at maximal fontsize vcolor="employees08", type="comp", fontsize.labels=10, lowerbound.cex.labels=1, inflate.labels = TRUE) # draw all labels at fixed fontsize vcolor="employees08", type="comp", fontsize.labels=10, lowerbound.cex.labels=1, force.print.labels=true)

10 tmplot ### graphical options: color palette # terrain colors sbsdata$employees.growth <- sbsdata$employees09 - sbsdata$employees08 vcolor="employees.growth", type="value", palette=terrain.colors(10)) # Brewer s Red-White-Grey palette reversed with predefined range vcolor="employees.growth", type="value", palette="-rdgy", range=c(-20000,20000))

Index Topic treemap treemap-package, 2 GNI2010, 3 sbsdata, 3 tmclick, 2, 3, 4 tmlocate, 2, 3, 4, 7 tmplot, 2, 4, 4 treemap (treemap-package), 2 treemap-package, 2 11