<<

Graphs, Trees and Networks

IAT 355

Is this a network?

IAT 355 | Graphs, Networks and Trees Is this a network?

IAT 355 | Graphs, Networks and Trees Is this a network?

IAT 355 | Graphs, Networks and Trees www.perceptualedge.com Is this a network?

• Introduction • Definition • Problem statement • Background • Related concepts in perception • Related concepts in visualization • Approach • Using colour • Colour mapping for meaning • Study • Results • Conclusion and future work

IAT 355 | Graphs, Networks and Trees Is this a network?

https://mkokos.wordpress.com/fourth-semester/personal-network-infographic/

IAT 355 | Graphs, Networks and Trees We live in a connected world

• Online Social networks: Facebook, Twitter ~ people connected online • Information networks: WWW ~ web pages connected through hyperlinks • Computer networks: The internet ~ computers and routers connected through wired/wireless connections • What is a network? “any collection of objects in which some pairs of these objects are connected by links” [Easley and Kleinberg, 2011]

IAT 355 | Graphs, Networks and Trees Visualizing Relations

Why relations? Isn’t all data inherently relational? • Visualising data: seeing the patterns between the data values and attributes that emerge and associate or disassociate in some way • Visualising relations: when how one datum relates to another is an element in itself

• We want to see the overall structure of the data set • Patterns emerge from structure as well as from values/ attributes

IAT 355 | Graphs, Networks and Trees Common Applications

• Process Visualization (e.g., • Concept maps Visio) • Ontologies • Dependency Graphs • Simulation and Modeling • Biological Interactions • Probability maps (Genes, Proteins) • Computer Networks • Social Networks

IAT 355 | Graphs, Networks and Trees Process flow diagrams

IAT 355 | Graphs, Networks and Trees Dependency graphs

IAT 355 | Graphs, Networks and Trees Gene networks

IAT 355 | Graphs, Networks and Trees Computer networks

IAT 355 | Graphs, Networks and Trees Internet

• What does the Internet look like? • Email paths

Nature, 406, 353-354(27 July 2000)

IAT 355 | Graphs, Networks and Trees Social networks

IAT 355 | Graphs, Networks and Trees Concept maps

IAT 355 | Graphs, Networks and Trees Ontologies

IAT 355 | Graphs, Networks and Trees Simulation graphs

IAT 355 | Graphs, Networks and Trees Probability maps

• Bayesian network

IAT 355 | Graphs, Networks and Trees • Several ways to represent relations

• Choice depends on relation, task and scale

T. Munzner, Visualization Analysis and Design.

IAT 355 | Graphs, Networks and Trees When is Graph Visualization Applicable?

• Ask the question: is there an inherent relation among the data elements to be visualized?

• If YES – then the data can be represented by nodes of a graph, with edges representing the relations.

• If NO – then the data elements are “unstructured” and goal is to use visualization to analyze and discover relationships among data.

Source: Herman, Graph Visualization and Navigation in Information Visualization: a Survey

IAT 355 | Graphs, Networks and Trees Graphs as Network Models

• Graphs are only ONE way to represent networks • Most powerful • Most popular • Graphs are well suited for topology-related problems • Distance through the network (hops), propagation, clusters defined by connectivity

{ arc , link , edge }

{ node , vertex } Source: L. Adamic SNA class @coursera

Network Visualization, QMSS @ Columbia @denisparra

IAT 355 | Graphs, Networks and Trees Graphs, Networks and Trees

• A graph (network) is a set of objects connected together • Objects == nodes, vertices • Connections == links, edges • • A path is the/a set of connections from node a to node b

• Topology is a schematic description of the arrangement of a graph/network, including nodes and links

IAT 355 | Graphs, Networks and Trees What kinds of relations?

• Associative (IS-A) • A is like B in some way • Ordinal/Sequential • A > B, precedes B, in some way • Time

• Hierarchy

• Influence • Causal • dependency

IAT 355 | Graphs, Networks and Trees Graphs: the problem

• YUK ……

IAT 355 | Graphs, Networks and Trees • Tree with 3238 nodes

3 different views of the same graph, made using Tulip

IAT 355 | Graphs, Networks and Trees Graph Terminology

A-C Hops 2 C-A Hops 0 • Graphs can have cycles A B C • Edges can be directed or undirected

• Degree of a vertex = # connected nodes A • In-degree and out-degree for directed In-degree 2 graphs Out-degree 1

• Graph edges can have values (weights) • Nominal (N), ordinal (O), quantitative (Q)

IAT 355 | Graphs, Networks and Trees What’s important here?

IAT 355 | Graphs, Networks and Trees What’s important here?

IAT 355 | Graphs, Networks and Trees Or here? Community structure concepts

• Cliques are subgraphs in which every node is connected to every other node in the clique.

• Cluster coefficient is a measure of how close a group is to being a clique.

IAT 355 | Graphs, Networks and Trees Graph tasks 1: topology

A-C Hops 2 • Finding all possible paths C-A Hops 0 A B C

• Shortest path • Distance/proximity: A • All adjacent nodes hops away In-degree 2 • Degree (how many nodes connect in or out) Out-degree 1

• Flow through the network (directional) • Finding bridges that connect clusters or components

IAT 355 | Graphs, Networks and Trees Undirected Directed multimode Weighted and (Facebook (Twitter (Amazon user- (Facebook more friendships) following) product) likes) ….

9 3

IAT 355 | Graphs, Networks and Trees Network Analysis measures

Node-level metrics Graph-level metrics • Centrality • Size • (In/Out) Degree • Diameter (longest path) • Betweenness • Average path length • Closeness • Average [node metric] • Eigenvector • Clustering coefficient

• These are only a few representative measures • http://www.slideshare.net/gcheliotis/social-network-analysis-3273045

IAT 355 | Graphs, Networks and Trees Interpretation of measures

Interpretation in Social Networks

Degree How many people can this person reach directly?

Betweenness How likely is this person to be the most direct route between two people in the network?

Source: http://www.slideshare.net/gcheliotis/social-network-analysis-3273045 slide 24

IAT 355 | Graphs, Networks and Trees Interpretation of measures

Interpretation in Social Networks

Closeness How fast can this person reach everyone in the network?

Eigenvector How well is this person connected to other well-connected people?

Source: http://www.slideshare.net/gcheliotis/social-network-analysis-3273045

IAT 355 | Graphs, Networks and Trees Two more concepts…

• Total possible number of edges in a network • #edges = n * (n -1 ) /2 (undirected network) • #edges = n * (n -1 ) (directed network)

• (Shortest) Path: the shortest sequence of edges to be followed to reach a node B from a node A in a network.

Which is the length of the shortest path between Rafa Nadal and Sharonpova?

IAT 355 | Graphs, Networks and Trees Using these concepts in network analysis

• compare these 2 movie networks (characters’ interactions) Source: http://moviegalaxies.com

Forrest Gump (1994) Traffic (2000)

IAT 355 | Graphs, Networks and Trees Network metrics: (1994) • Size: 94/271 • Density: 0.06 • Diameter: 4 • Clustering coefficient: 0.8 • Avg. Path Length: 1.99

Node metrics: Forrest • Degree: 89 • Betweetnness: 3453.8 Abbie Hoffman • Degree: 6 • Betweenness: 0 http://moviegalaxies.com/movies/316-Forrest-Gump

IAT 355 | Graphs, Networks and Trees Traffic (2000) Network metrics: • Size: 68 • Density: 0.04 • Diameter: 7 • Clustering coefficient: 0.55 • Avg. Path Length: 3.54

Node metrics: Robert • Degree: 24 * Francisco: is a bridge (structural holes) • Betweenness: 1437.7 Francisco • Degree: 5 • Betweenness: 1031

http://moviegalaxies.com/movies/837-Traffic IAT 355 | Graphs, Networks and Trees Design Choices 1

• Depends on key connectivity relationships to be prioritized

IAT 355 | Graphs, Networks and Trees Node-link diagrams

Most common idiom for network and tree data

Blog.visual.ly SAS Constellation Tool

IAT 355 | Graphs, Networks and Trees Node-link diagrams

Most common idiom for network and tree data

Rectilinear Radial

B. Harvey & M. Wright. Simply Scheme, Introducing IBM Java Vis blog Computer Science

IAT 355 | Graphs, Networks and Trees Vertex/Node choices

• Colour • Size • Label • Form/Shape • Location/Layout

IAT 355 | Graphs, Networks and Trees Edge options

• Colour • Thickness • Label • Form • Polyline, straight, orthogonal, grid, curved, planar up/down …

IAT 355 | Graphs, Networks and Trees Aesthetic constraints

• Minimize link crossings • Often unsuitable for • Minimize link lengths interactive visualisation • Area – minimize towards • Approximation algorithms efficiency very complex • Unless you only need to • Minimize link bends compute layout once • uniform edge lengths – • Precompute layout, or minimise variances compute once at the • Minimize lomgest edge beginning of an application then support interaction • Mathematically difficult to do everything !

IAT 355 | Graphs, Networks and Trees Which is most important?

• Various studies • BUT • Purchase, Graph Drawing ’97 • A recent study (Xu et al 2012) • Ware et al, Info Vis 1(2) found edge crossings less • Ghoniem et al, Info Vis 4(2) important than path distance • van Ham & Rogowitz, TVCG and smoothness ’08 • Curved lines may be preferred • Results mixed: Edge but performance is better with crossings do seem important straight ..

IAT 355 | Graphs, Networks and Trees Aesthetics are not yet defined fully [Xu et al. 2012]

• Lombardi layout a reasonable approach, • Uses curved lines only when straight lines are not optimal

Kai Xu, Chris Rooney, Peter Passmore, Dong-Han Ham, and Phong H. Nguyen. A User Study on Curved Edges in Graph Visualization , InfoVis 2012.

IAT 355 | Graphs, Networks and Trees Graph Visualization Tasks [Stasko]

1. Topology-based tasks • Adjacency (find the set of adjacent nodes) • Accessibility (find the set of nodes accessible to a node given a limit of hops) • Common connection (given nodes, find the set of nodes connected to all members) • Connectivity • Find shortest path • Identify bridges

IAT 355 | Graphs, Networks and Trees Graph Visualization Tasks [Stasko]

2. Attribute-based tasks • Nodes(find the set of nodes with a specific attribute) • Edges (Given a node, find the nodes connected only by certain kinds of edges)

IAT 355 | Graphs, Networks and Trees Graph Visualization Tasks [Stasko]

3. Browsing tasks • Follow a path • Revisit a previously visited node or path • Explore different paths to same end –end connections

4. Overview and summary tasks • Compound exploratory task • Estimate network size and shape • Find patterns • Find clusters

IAT 355 | Graphs, Networks and Trees Graph Layout

• How to position the nodes and edges? • Space does not directly encode VALUE • The primary concern with graphs

• Other visual features common • Colour • Size • ….

IAT 355 | Graphs, Networks and Trees Layout Approaches: node-link

• Optimization-based techniques • Includes spring-embedding / force-directed layout

• Hierarchical graph layout • Tree-ify the graph - then use tree layout

• Radial graph layout

• On-demand revealing of subgraphs

• Distortion-based views • Hyperbolic browser

IAT 355 | Graphs, Networks and Trees Optimization-based layout

• Specify constraints for layout • Series of mathematical equations • Hand to “solver” which tries to optimize the constraints • Examples • Minimize edge crossings, line bends, etc • Multi-dimensional scaling (preserve multi-dim distance) • Force-directed placement (use physics metaphor) • Benefits • General applicability • Often customizable by adding new constraints

IAT 355 | Graphs, Networks and Trees Force-directed placement

• Widely used • Use an algorithm of “springs” and “forces” to iteratively position nodes to some specified tolerance • Simple to explain and implement • Clustering “behaviour” • exploits perceptual cue of proximity • can be due to strong links or strong repelling (dissimilar) forces: ambiguous

visual wordnet http://www.kylescholz.com/projects/wordnet visuwords http://www.visuwords.com/

IAT 355 | Graphs, Networks and Trees Force-directed placement

• D3 graphs using force directed layout, colour and size

http://mbostock.github.com/d3/

IAT 355 | Graphs, Networks and Trees Force-directed layout

• Radial constraints

• Whisky flavours

IAT 355 | Graphs, Networks and Trees Issues

• Popular and easy • Nondeterministic • mall changes in input can have large changes in output • randomness, no constraints on maintaining geometric proximity • Jitter • Scalability: the “hairball” problem

IAT 355 | Graphs, Networks and Trees Radial layouts

• More efficient use of space

IAT 355 | Graphs, Networks and Trees Radial Layout

• Animated Exploration of Graphs with Radial Layout, Yee et al., 2001 • Gnutella network

IAT 355 | Graphs, Networks and Trees Radial layouts

• Very simple • Plot nodes around the circumference • Edges connect them • Minimise crossings • Can get very complex quickly

IAT 355 | Graphs, Networks and Trees Tree layouts

• Topological structure with hierarchy • Parent-child relations are paramount • can have explicit sibling links but usually implicit

IAT 355 | Graphs, Networks and Trees Graph and Tree Data Structures

• Graphs: • Representations of structured, connected data • Consist of a set of nodes (data) and a set of edges (relations) • Edges can be directed or undirected

• Trees: • Graphs with a specific structure • connected graph with n-1 edges • Representations of data with natural hierarchy • Nodes are either parents or children

IAT 355 | Graphs, Networks and Trees Hierarchical Information

• Pervasive • File / Directory systems on computers • Classifications / Taxonomies / Controlled Vocabularies • Software Menu structure • Organization charts • … Hierarchical Information

• Indented Outlines • Good for Searching Bad for Structure • Node-Link Trees • Radial Layout • Space-Filling Treemaps • … Rectilinear layouts

Spatial position encodes information • depth in tree • Width proportional to # of Children at Different Levels

IAT 355 | Graphs, Networks and Trees Radial layouts

Spatial position encodes • depth as distance from centre • Extent of arc - # children

IAT 355 | Graphs, Networks and Trees 3D ConeTree

• Positive • Higher Information Density • Smooth animation

• Negative • Occlusion • Non-trivial to implement • Requires horsepower

3D used to increase Information Density

Children laid out in a cylinder “below” parent

IAT 355 | Graphs, Networks and Trees Traditional Node-Link Layout è SpaceTree

• HCI Lab – University of Maryland http://www.cs.umd.edu/hcil/spacetree/

http://www.scils.rutgers.edu/~aspoerri/Teaching/InfoVisResources/videos/ Space Tree cont.

IAT 355 | Graphs, Networks and Trees Tree-link diagrams

Cone tree

IAT 355 | Graphs, Networks and Trees Adjacency Matrices

• So far, only looked at node-link diagrams • Often doesn’t scale well due to edge- crossings, occlusion, etc. --> hard to read • One solution: adjacency matrix • show graph as table • nodes as rows/columns • edges as table cells

IAT 355 | Graphs, Networks and Trees Matrices

http://www.informaworld.com/smpp/content~content=a789632485~db=all IAT 355 | Graphs, Networks and Trees 20 Years of Four HCI Conferences: A Visual Exploration Henry et al. IJHCI 2007 Matrices with Submatrices

• http://www.informaworld.com/smpp/content~content=a789632485~db=all

IAT 355 | Graphs, Networks and Trees The two views can co-exist

Michael J. McGuffin. “Simple Algorithms for Network Visualization: A Tutorial.” Tsinghua Science and Technology (Special Issue on Visualization and Computer Graphics) 17:4 (2012), 383–398 IAT 355 | Graphs, Networks and Trees Tree – containment diagrams

Treemap

IAT 355 | Graphs, Networks and Trees • Treemaps • Recursive, repeated subdivision of space

IAT 355 | Graphs, Networks and Trees Tree layouts: containment

IAT 355 | Graphs, Networks and Trees Treemaps – “Slice & Dice”

IAT 355 | Graphs, Networks and Trees Which Problem do Treemaps aim to address?

• Visualize hierarchical structure as well as content of (atom) nodes • main design goals? • Space–filling (High Data / Ink Ratio) • “Structure” is represented using Enclosure / Containment • “Content” is represented using Area • Pre–attentive, Early Visual Processes Used • Position, Size = Area, Color, Containment

IAT 355 | Graphs, Networks and Trees Balloon graphs: containment

• Nested levels

IAT 355 | Graphs, Networks and Trees Containment and connectivity

• Compound networks can use both marks • Interaction: expand metanodes to change the “cut”

IAT 355 | Graphs, Networks and Trees Tree layouts

• Eight visual encoding idioms showing the same tree dataset, using different combinations of visual channels.

[T. Munzner, Visualization Analysis and Design]

IAT 355 | Graphs, Networks and Trees Tree-based graph layout

• Select a tree-structure out of the graph • Breadth-first-search tree • Minimum spanning tree • Other domain-specific structures • Use a tree layout algorithm • Benefits • Fast, supports interaction and refinement • Drawbacks • Limited range of layouts

IAT 355 | Graphs, Networks and Trees Tree-ify the graph

IAT 355 | Graphs, Networks and Trees Tree-ify the graph

IAT 355 | Graphs, Networks and Trees Hierarchical graph layout

• Use directed structure of graph to inform layout • Order the graph into distinct levels • this determines one dimension • Now optimize within levels • determines the second dimension • minimize edge crossings, etc • The method used in graphviz’s “dot” algorithm • Great for directed acyclic graphs, but often misleading in the case of cycles

IAT 355 | Graphs, Networks and Trees Hierarchical Graph Layout

• Evolution of the UNIX operating system • Hierarchical layering based on descent

IAT 355 | Graphs, Networks and Trees IAT 355 | Graphs, Networks and Trees Hierarchical graph layout

Gnutella network

IAT 355 | Graphs, Networks and Trees Typical Sugiyama layout (dot) - preserves tree structure

Alternative method - preserves uniform edge lengths

IAT 355 | Graphs, Networks and Trees slide borrowed from Tim Dwyer and Marti Hearst slide borrowed from Tim Dwyer

Examples

IAT 355 | Graphs, Networks and Trees Node-link graphs

• Not very scaleable • Good for topological tasks • Re-ordering can disorient • Perceptually intuitive • Good for smaller networks • Perceptually unstable (some)

IAT 355 | Graphs, Networks and Trees Matrices

• Very scaleable • Fast node-lookup • Good for link density • Perceptually stable • Easily support re-ordering • Hard to learn

IAT 355 | Graphs, Networks and Trees Treemaps

• Very scaleable • Support finding outliers • Good for hierarchy • Perceptually stable • Good for understanding node • Very little support for attribute values topological tasks

IAT 355 | Graphs, Networks and Trees