N328 Visualizing Information Week 13: Networks & Trees Khairi Reda | redak@iu.edu School of Informa5cs & Compu5ng, IUPUI
tables networks friendship network
Websites as networks of pages wired.com cnn.com apple.com Via Miriah Meyer
Network (aka Graph) V: Set of ver5ces (or nodes) E: Set of edges (or connec5ons) An edge e = (x, y) connects two ver5ces x and y For example: V = {1, 2, 3, 4} E = {(1,2), (1, 4), (3, 2), (3, 4)} 4 3 1 3 1 3 4 1 Node-link 2 4 diagram 2 2
Graph terminology trees Via Miriah Meyer
Graph vs. Tree Graph Nodes and edges No constraint on edges Hierarchical organizational Tree structures Parents and children No “loops” Genome / phenotype similarity (tree of life)
Node-Link Diagram
Node-Link Diagram http://bl.ocks.org/mbostock/4063550
Node-Link tree diagrams Limita5ons • Tree breadth tend to grow exponen5ally • Quickly run out of space! Hyperbolic layout • Solu5ons • Scrolling or panning • Collapsing nodes • Hyperbolic layouts Based on a slide by Miriah Meyer
Icicle Plot A A B C B C D E F D E F X Y Z X Z Y
Icicle Plot
Radial Icicle Plot http://bl.ocks.org/mbostock/raw/4348373/
IndentaKon • Place all items along ver5cal paced rows • Indenta5on used to show parent/ child rela5onships • Commonly used as a component in user interfaces (e.g., File Explorer, Finder) • OUen requires significant scrolling Based on a slide by Miriah Meyer
Enclosure Diagrams • Encode structure using spa5al enclosure A • OUen referred to as a treemap B C • Pros D E • Provides single view of en5re tree • Easier to spot small/large branches A C • Cons B D • Difficult to interpret depth E Based on a slide by Miriah Meyer
Treemap http://homes.cs.washington.edu/~jheer//files/zoo/
Treemap Disk Inventory X
Graph vs. Tree Graph Nodes and edges No constraint on edges Tree Parents and children No “loops”
Visualizing Graphs • Node-link layouts • Force-Directed layout • A[ribute-based • Adjacency matrices • Aggregate Views • Mo5f Glyphs • PivotGraph
Node-link diagrams • Primary concern of graph drawing is layout 1 3 of nodes (and ul5mately the edges) • Goal is to effecKvely depict the overall 2 4 graph structure • Connec5vity, path following 3 • Clusters 4 1 • Key readability measure: reduce the frequency of edge crossing 2
Exercise create an aesthe5cally pleasing node-link diagram for this network Miriah Meyer
Exercise create an aesthe5cally pleasing node-link diagram for this network Miriah Meyer
Force-directed layout • Physical model • Nodes = repulsive par5cles • Edges = springs Miriah Meyer
Force-directed layout http://bl.ocks.org/mbostock/4062045
Force-directed layout • Many varia5ons, but usually physical analogy: • Repulsion force: f R (d) = C R * m 1 *m 2 / d 2 • m1, m2 are node masses • d is distance between nodes • AUracKon force: f A (d) = C A * (d – L) • L is the rest length of the spring • Total force on a node x with posi5on x’ ∑ neighbors(x) : fA(||x’-y’||) * (x’-y’) + -fR(||x’-y’||) * (x’-y’) Miriah Meyer
Force-directed layout Algorithm • Start from a random layout • Loop (top-level): • For every node pair, compute repulsive force • For every node pair, compute a[rac5ve force • accumulate forces per node • update each node posi5on in direc5on of accumulated force • stop when layout is ‘good enough’ Miriah Meyer
Collapsable force-directed graphs https://bl.ocks.org/mbostock/1062288
The internet
Force-directed layout • Pros • Flexible, aesthe5cally pleasing layouts on many types of graphs • Can add custom forces • Rela5vely easy to implement • Cons • Computa5onally expensive O(n 3 ) for a non- op5mized implementa5on • Prone to local minima Based on a slide by Miriah Meyer
Node-link diagram • Pros • Intui5ve visual mapping • Can show overall structure, clusters, and paths • Cons • Not good for dense graphs (the hairball problem) Based on a slide by Miriah Meyer
Visualizing Graphs • Node-link layouts • Force-Directed layout • A[ribute-based • Adjacency matrices • Aggregate Views • Mo5f Glyphs • PivotGraph
Adjacency Matrix Miriah Meyer
Adjacency Matrix https://bost.ocks.org/mike/miserables/
Adjacency Matrix • Pros • Good for dense graphs • Visually scalable • Highlights clusters • Cons • Not as intui5ve, compared to a graph • Row/column order affects percep5on of pa[erns • Hard to follow paths
Hybrid: node-link + matrix NodeTrix , Henry and Fekete, 2007
Visualizing Graphs • Node-link layouts • Force-Directed layout • A[ribute-based • Adjacency matrices • Aggregate Views • Mo5f Glyphs • PivotGraph
MoKf Glyphs connector clique fan Dunne 2013
MoKf Glyphs Dunne 2013
MoKf Glyphs Dunne 2013
Recommend
More recommend