Graphs and Networks

jazzydoeSoftware and s/w Development

Oct 30, 2013 (3 years and 11 months ago)

73 views

1
/64


Lecture 19:

Graphs and Networks

April 18, 2013


COMP
150
-
2

Visualization

2
/64


Definition


Graphs represent connections or relationships



Social network


Software execution (call graph)


Gene expression


Financial transactions


WWW


US telephone system



One of the oldest and most studied areas of
information visualization

3
/64


What Makes a Graph?


Vertices (nodes)


Edges (links)



Adjacency list:

1: 2

2: 1, 3

3: 2

4
/64


Comparing Representations


5
/64


Terminology


Directed vs. Undirected



Cyclic vs. Acyclic



Degree of a vertex


In
-
degree


Out
-
degree



Weights on edges



6
/64


More Terminology


Centrality Measures:



Degree Centrality


How many neighbors does a vertex have?


Betweenness

Centrality


How often does a vertex appear in paths between other
nodes?


Closeness Centrality


How quickly can a node reach all other nodes in the graph?


Eigenvector Centrality


Google PageRank (assumes directed graph)

7
/64


Graphs vs. Trees


Tree is a special case of a general graph


There are no cycles in a tree


Edges are (usually) directed or are implicitly
directed


Special designations for root, leaves, etc.


8
/64


Challenges in Graph Visualization


Graph layout and position


Related to your assignment!



Navigation / Interaction


How to support a user in understanding all the
relationships in the graph



Scale


What happens if the graph has 10 nodes? 1,000
nodes? 1,000,000 nodes?

9
/64


Graph Drawing Conference


The problem of graph layout remains
unsolved…


Question: what are we trying to optimize?


http://www.graphdrawing.org/gd2010
/



10
/64


What Makes a Good Layout?


Total Edge Length


minimize towards proper
scale


Area



minimize for efficiency (
Tufte
!)


Maximum Edge Length


minimize longest edge


Uniform Edge Lengths


minimize variances


Total Bends


minimize orthogonal towards
straight lines


Crossings



minimize towards planar


http://
www.youtube.com/watch?v=EiS
-
W9aeG0s

11
/64


Let People Decide!


Paper by Frank van Ham and Bernice
Rogowitz

from IBM Research (published in
InfoVis

2008)



http://www.research.ibm.com/visual/papers/
IEEEViz_VanHam%20and%20Rogowitz_final.p
df

12
/64


Not An Exact Set of Criteria

Image from
Kamada

and Kawai (1988)

13
/64


NetViz

Nirvana


Proposed by Ben
Shneiderman



Every node is visible


Every node’s degree is countable


Every edge can be followed from source to
destination


Clusters and outliers
are identifiable

14
/64


15
/64


16
/64





Questions?

17
/64


Common Layout Techniques


Hierarchical


Force
-
directed


Circular


Geographic


Clustered


Attribute
-
based


Matrix

18
/64


Layout + Scale


Many of these layout algorithms are constrained
by scale.



For example, (naive) force directed layout is
O(n^2). When n becomes large, computation
slows down.



Even without computation, when n becomes
large, it is difficult (impossible?) to guarantee
visibility for every vertex.



Solutions?

19
/64


Navigation / Interaction


Give a large, dense graph, how do we use
interaction to help the user query, visit,
traverse, and analyze the graph?



Such navigation / interaction aides can utilize
other visualization techniques

20
/64


Examples


http://
www.nytimes.com/interactive/2008/0
5/05/science/20080506_DISEASE.html



http://
mibi.deviantart.com/art/Death
-
and
-
Taxes
-
2007
-
39894058



http://
perlitalabs.files.wordpress.com/2010/0
6/social
-
graphs
-
to
-
visualize
-
political
-
factions1.png


21
/64


More Examples


http://www
-
958.ibm.com/software/data/cognos/manyeyes/visuali
zations/co
-
occurrences
-
of
-
names
-
in
-
the
-
new
-
3



http://conceptmodeler.wordpress.com/



http://www.visualcomplexity.com/vc/project_details.c
fm?id=392&index=392&domain
=



http
://blog.kobayashi.eu/wp
-
content/uploads/2010/09/poster_rappers_1300.jpg

22
/64


Social Networks


Facilitate understanding of complex socio
-
economic
patterns



Social Science visualization gallery (
Lothar

Krempel
):


http://www.mpi
-
fg
-
koeln.mpg.de/~lk/netvis.html



Social Network Analysis (
www.insna.org
)



http://www.slate.com/id/2180392/


23
/64


Geography

24
/64


Examples


http://
www.nsf.gov/news/special_reports/sci
vis/follow_money.jsp



http://
www.facebook.com/notes/facebook
-
engineering/visualizing
-
friendships/469716398919



http://www.aaronkoblin.com/work/flightpatt
erns/

25
/64


Subway Maps

London Tube

26
/64


Boston T


http://
www.google.com/images?q=Boston+T
&um=1&ie=UTF
-
8&source=og&sa=N&hl=en&tab=wi&biw=10
31&bih=1376



http://www.mbta.com/schedules_and_maps
/subway/

27
/64





Questions?

28
/64


Circular Layout

29
/64


Circular Layout + Edge Bundling


http://flare.prefuse.or
g/apps/dependency_g
raph

30
/64


Tree Layout


Forcing a graph into a tree
layout



Spanning tree



Hierarchical Layout


31
/64


Sugiyama Method

Images from van Dalen and
Spaans

(2001)

32
/64


Force
-
Directed Layout


Common Spring Model


Edges


springs that attract


Vertices


charged particles that repel



Iteratively computes new positions of the vertices
based on the lengths of the edges



Seeks to minimize the total energy of the system
down to 0



http://jung.sourceforge.net/applet/showlayouts.html


33
/64


Force Directed Layout


Naïve
Spring network (
assignment
5)



Optimized Spring network (Barnes
-
Hut)


http://
en.wikipedia.org/wiki/Barnes%E2%80%93Hut_simulatio
n



Frauchterman
-
Reingold


Adds global temperature (simulated annealing)


http://
citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.13.8
444



Kamada
-
Kawai


Computes the derivative of the overall energy function


Iteratively improves the search for global layout


http://cs.wellesley.edu/~cs315/Papers/Kamada
-
Graph%20Drawing.pdf


34
/64





Questions?

35
/64


Recent Trends in Graph Visualization


Attributes of nodes influence the layout


Not just arbitrary layout



Utilize graph statistics



Driven by interests in social network analysis

36
/64


PivotGraph


Cluster on common node attributes


Put all A’s together into a node, all B’s together
into a node



“Roll up” the nodes


Draw edge from A to B depending on how many
edges go from some A to some B



Position nodes on a grid based on data
attributes

Wattenberg CHI 06

37
/64


PivotGraph

38
/64


Semantic Substrates


Group nodes into regions


According to an attribute


Categorical, ordinal, or binned numerical



In each region:


Position nodes according to some other attributes



Give users control of link visibility



http://www.cs.umd.edu/hcil/nvss/

Shneiderman

InfoVis

06

39
/64


Semantic Substrates

40
/64


Vizster


Visualize social networking sites (Friendster,
MySpace, Facebook).


Think 2005 when social network is just starting!


http://hci.stanford.edu/jheer/projects/vizster/



Heer

InfoVis

05

41
/64


SocialAction


Combines graph structure analysis with
interactive visual exploration



Multiple coordinated views


Lists by ranking for analysis data


Force
-
directed layout for graph



http://www.cs.umd.edu/hcil/socialaction/

Perer

InfoVis

06

42
/64


Social Network Attributes


Barycenter


total shortest path of a node to all other nodes


Betweenness

Centrality


How often a node appears on the shortest paths between all other
nodes


Closeness Centrality


How close a node is compared to all other nodes


Min
-
cut


If the removal of a node creates disconnected
subgraph
(s)


Degree


Number of neighbors


HITS (Hyperlink
-
Induced Topic Search), also known as “Hubs and
Authorities”


Precursor to Google PageRank


43
/64


Attribute Ranking


Run these measures on all nodes and rank
them



Use secondary visualizations to display them
(lists, scatterplots,
etc
)



Allow the user to interact with both the graph
and the secondary visualizations

44
/64


PNNL’s Graph Vis


Graph “Signature”

Wong TVCG 06

45
/64


Graph Signature

46
/64


Graph Signature

47
/64


48
/64


Graphs as Maps

http://www2.research.att.com/~yifanhu/MAPS/imap.html

49
/64


Matrix Representation


An obvious alternative visualization of graphs
is a matrix…

Ghoniem

InfoVis

04

50
/64


Matrix Representation

How does one
read a Matrix
visualization?


Importance of
sorting…

Henry
InfoVis

06

51
/64


Matrix Representation

Liiv
, BELIV 2010

52
/64


NodeTrix

Hybrid of matrix and
node
-
link


Best of both worlds?


Worst of both
methods?

Henry
InfoVis

07

53
/64





Questions?

54
/64


Interaction


Interaction can be used as an alternative (or a
Band
-
Aid) to visualizing:



Difficult graphs using existing layout algorithms


Graphs that are significantly larger than what can
be displayed on screen



Challenges:


What types of interactions make sense?


How to make graphs interactive?

55
/64


MoireGraph


Uses radial layout



Takes a hierarchical data as input (much like a tree)


If no hierarchy is available, impose levels of the graph by
performing minimum spanning tree



Put root at the center, children are further out
towards the edge of the circle, with decreasing
emphasis (similar to hyperbolic trees)



Like hyperbolic trees, interaction is key

56
/64


MoireGraph

Jankun
-
Kelly
InfoVis

03

57
/64


MoireGraph


58
/64


MoireGraph

Layout

59
/64


60
/64


Interactive Big Graphs

Van Ham
InfoVis

2010

61
/64


Interactive Big Graphs


Similar to
SocialAction


Use additional attributes (graph characteristics)
to assist in the analysis



Allow users to focus on particular nodes


Apply Degree
-
of
-
Interest (DOI) methods



Rely heavily on interaction

62
/64


Animating Change of Focus

Yee
InfoVis

01

63
/64


Animating Change of Focus

64
/64





Questions?