54
Nov 26, 2009 IAT 800 1 IAT 800 Visualizing Trees _________________________________________________________________________________ _____ SCHOOL OF INTERACTIVE ARTS + TECHNOLOGY [SIAT] | WWW.SIAT.SFU.CA

Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Embed Size (px)

Citation preview

Page 1: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 1

IAT 800

Visualizing Trees

______________________________________________________________________________________

SCHOOL OF INTERACTIVE ARTS + TECHNOLOGY [SIAT] | WWW.SIAT.SFU.CA

Page 2: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 2

Hierarchies

• Definition– Data repository in which cases are related

to subcases– Can be thought of as imposing an ordering

in which cases are parents or ancestors of other cases

Page 3: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 3

Hierarchies in the World

• Examples– Family histories, ancestries– File/directory systems on computers– Organization charts– Animal kingdom: Phylum,…, genus,…

Page 4: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 4

Trees

• Hierarchies often represented as trees– Directed, acyclic graph

• Two main representation schemes– Node-link – Space-filling

Page 5: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 5

Task

• Learn the structure of the hierarchy

• Example Structure questions– Who has the most descendants?– What family tends to have the most

children?

• Example Search question– Who is Bob’s paternal grandfather?

Page 6: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 6

Node-Link Diagrams

• Root at top, leaves at bottom is very common

Page 7: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 7

Sample Representation

From Johnson &Shneiderman 1991

Page 8: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 8

Example

• Layout– Tree level indicated by X– Unique item per Y slot– Takes advantage of reading order

• Good for?– Search

• Bad for?– Understanding Structure– 1 folder per row pushes large

structures away

Page 9: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 9

Why Put Root at Top?

• Root can be at center with levels growing outward too

• Can any node be the root?

Page 10: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 10

Drawing a Tree

• Show more structure by allocating space differently– 1 horizontal slice per level– How wide should it be?

Page 11: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 11

Drawing a Tree

• How to draw this?– Depth-First Search– Propagate size requirements upward from

leaves

Page 12: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 12

Potential Problems

• For top-down, width of fan-out uses up horizontal real estate very quickly– At level n, there are 2n nodes

• Tree might grow a lot along one particular branch– Hard to draw it well in view without knowing

how it will branch

Page 13: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 13

InfoVis Solutions

• Techniques developed in Information Visualization largely try to assist the problems identified in the last slide

• Alternatively, Information Visualization techniques attempt to show more attributes of data cases in hierarchy or focus on particular applications of trees

Page 14: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 14

SpaceTree• Uses conventional 2D layout techniques

• What are its unique features?– Grosjean, Plaisant, Bederson InfoVis ‘02

Page 15: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 15

SpaceTree Characteristics

• Vertical or horizontal

• Subtrees are triangles– Size indicates depth– Shading indicates number of nodes inside

• Navigate by clicking on nodes– Strongly restrict zooming

Page 16: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 16

SpaceTree Design Features

• Make labels readable

• Maximize number of levels opened

• Decompose tree animation

• Use landmarks

• Use overview and dynamic filtering

Page 17: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 17

3D Approaches

• Add a third dimension into which layout can go

• Compromise of top-down and centered techniques mentioned earlier

• Children of a node are laid out in a cylinder “below” the parent– Siblings live in one of the 2D planes

Page 18: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 18

ConeTree

• Interactive tree viewer

• Clicking on node rotates it to front

• Occlusion makes stuff hard to pick

Page 19: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 19

Alternative View

Page 20: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 20

Cone Trees

• Positive– More effective area (volume) to lay out tree– Use of smooth animation to help person

track updates– Aesthetically pleasing

• Negative– Occlusion obscures some nodes– Requires some graphics horsepower

Page 21: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 21

Alternative Solutions

• Change the geometry• Apply a hyperbolic transformation to the

space• Root is at center, subordinates around• Apply idea recursively, distance

decreases between parent and child as you move farther from center, children go in wedge rather than circle

Page 22: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 22

Hyperbolic Browser

• Focus + Context Technique– Detailed view blended with a global view

• First lay out the hierarchy on the hyperbolic plane

• Then map this plane to a disk• Start with the tree’s root at the center• Use animation to navigate along this

representation of the plane

Page 23: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 23

2D Hyperbolic Browser

• Approach: Lay out the hierarchy on the hyperbolic plane and map this plane onto a display region.

• Comparison– A standard 2D browser:

100 nodes (w/3 character text strings)

– Hyperbolic browser: 1000 nodes, about 50 nearest the focus can show from 3 to dozens of characters

• YouTube User “Treerao”

Page 24: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 24

Hyperbolic Key Attributes

• Natural magnification (fisheye) in center– Layout depends only on 2-3 generations from current node– Smooth animation for change in focus– Don’t draw objects when far enough from root (simplify

rendering)

• Problems– Watching the view can be disorienting– When a node is moved, its children don’t keep their relative

orientation to it as in Euclidean plane, they rotate– Not as symmetric and regular as Euclidean techniques

• Makes visual search more difficult

Page 25: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 25

Node-link Shortcoming

• Difficult to encode more variables of data cases (nodes)– Shape– Color– Size– …but all quickly clash with basic node-link

structure

Page 26: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 26

Space-Filling Representation

• Each item occupies an area

• Children are “contained” under parent– Example shows each horizontal slice

corresponding to a tree level– Width of box displays node size

Page 27: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 27

Treemap

• Space-filling representation developed by Shneiderman and Johnson, Vis ‘91

• Children are drawn inside their parent

• Alternate horizontal and vertical slicing at each successive level

• Use area to encode other variable of data items

Page 28: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 28

Treemap

• Example

Folders

Page 29: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 29

TreeMap Demo

Page 30: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 30

Treemap Algorithm

Draw(){

Change orientation from parent (horiz/vert)Read all files and directories at this levelMake rectangle for each, scaled to sizeDraw rectangles using appropriate size and colorFor each directory

Make recursive call using its rectangle as focus

}

Page 31: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 31

Nested vs. Non-nested

• Non-nested Nested

Page 32: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 32

Applications

• Can use Treemap idea for a variety of domains– File/directory structures– Basketball statistics– Software diagrams

• Useful where there is a size query

Page 33: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 33

Internet News Groups

• NetScan

Page 34: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 34

Treemap Affordances

• Good representation of two attributes beyond node-link: color and area

• Not as good at representing structure– What happens if it’s a perfectly balanced

tree of items all the same size?– Also can get long-thin aspect ratios– Borders help on smaller trees, but take up

too much area on large, deep ones

Page 35: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 35

Aspect ratios

• Long thin rectangles hard to use

• Hard to estimate area

• Which one is bigger?

Page 36: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 36

More squareness!

• Can we force a rectangle to be “more square”?

• Problem is that other rectangles have to change shape

• NP Hard problem (Optimization, bin packing..)

Page 37: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 37

Variation: “Cluster” Treemap

• SmartMoney.com Map of the Market– Illustrates stock movements– “Compromises” treemap algorithm to avoid

bad aspect ratios– Basic algorithm (divide and conquer) with

some hand tweaking– Takes advantage of shallow hierarchy– www.smartmoney.com/marketmap

Page 38: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 38

Page 39: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 39

SmartMoney Review

• Dynamic user interface operations add to impact

Page 40: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 40

Square Algorithm Problems

• Small changes in data values can cause dramatic changes in layout

• Order of items in a group may be important

Page 41: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 41

Showing Structure

• Regular borderless treemap makes it challenging to discern structure of hierarchy, particularly large ones– Supplement Treemap view– Change rectangles to other forms

Page 42: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 42

Variation: Cushion Treemap

• Add shading and texture to convey structure of hierarchy

Page 43: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 43

SequoiaView• File visualizer using cushion treemap

• www.win.tue.nl/sequoiaview/

Page 44: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 44

News Stories• www.marumushi.com/apps/newsmap/newsmap.cfm

Page 45: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 45

Another Problem

• What if nodes with zero value (mapped to area) are very important?– Example: Stock or mutual fund portfolios:

Funds you don’t currently hold have zero value in your portfolio, but you want to see them to potentially buy them

Page 46: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 46

FundExplorer

• Show mutual fund portfolios, including funds not currently held– Area maps to your relative investment in

fund

• Want to help the user with portfolio diversification as well– If I add fund X, how does that overlap with

my current fund holdings?

Page 47: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 47

Solution

• Context Treemap – Treemap with small distortion– Give zero-valued items (all together) some

constant proportion of screen area– Provide dynamic query capabilities to

enhance exploration leading to portfolio diversification

Page 48: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 48

FundExplorer

Page 49: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 49

What about Radial Space filling?

• What if we used a radial rather than a rectangular space-filling technique?– We saw node-link trees with root in center

and growing outward already...

• Make pie-tree with root in center and children growing outward– Radial angle now corresponds to a

variables rather than area

Page 50: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 50

SunBurst• Stasko et al 2000

Page 51: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 51

SunBurst

• Root directory at center, each successive level drawn farther out from center

• Sweep angle of item corresponds to size• Color maps to file type or age• Interactive controls for moving deeper in

hierarchy, changing the root, etc.• Double-click on directory makes it new root

Page 52: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 52

Zoomology

• Not quite space filling– Circles within

circles– Alternative

structure view

• Highly Interactive

Page 53: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 53

Zoomology

• Coordinated structure views

Page 54: Nov 26, 2009 IAT 800 1 Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS

Nov 26, 2009 IAT 800 54

Space-Filling Representation

• Good for trees with– Size attribute– Shallow hierarchy

• Not so good– Showing structure– Showing links other than parent-child– Supporting visual search for a single item