660 likes | 762 Views
Lecture 19: Graphs and Networks. April 18, 2013 COMP 150-2 Visualization. Definition. Graphs represent connections or relationships Social network Software execution (call graph) Gene expression Financial transactions WWW US telephone system
E N D
Lecture 19:Graphs and Networks April 18, 2013 COMP 150-2Visualization
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
What Makes a Graph? • Vertices (nodes) • Edges (links) • Adjacency list: • 1: 2 • 2: 1, 3 • 3: 2
Terminology • Directed vs. Undirected • Cyclic vs. Acyclic • Degree of a vertex • In-degree • Out-degree • Weights on edges
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)
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.
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?
Graph Drawing Conference • The problem of graph layout remains unsolved… • Question: what are we trying to optimize? • http://www.graphdrawing.org/gd2010/
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
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.pdf
Not An Exact Set of Criteria Image from Kamada and Kawai (1988)
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
Common Layout Techniques • Hierarchical • Force-directed • Circular • Geographic • Clustered • Attribute-based • Matrix
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?
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
Examples • http://www.nytimes.com/interactive/2008/05/05/science/20080506_DISEASE.html • http://mibi.deviantart.com/art/Death-and-Taxes-2007-39894058 • http://perlitalabs.files.wordpress.com/2010/06/social-graphs-to-visualize-political-factions1.png
More Examples • http://www-958.ibm.com/software/data/cognos/manyeyes/visualizations/co-occurrences-of-names-in-the-new-3 • http://conceptmodeler.wordpress.com/ • http://www.visualcomplexity.com/vc/project_details.cfm?id=392&index=392&domain= • http://blog.kobayashi.eu/wp-content/uploads/2010/09/poster_rappers_1300.jpg
Social Networks • Facilitate understanding of complex socio-economic patterns • Social Science visualization gallery (LotharKrempel): • http://www.mpi-fg-koeln.mpg.de/~lk/netvis.html • Social Network Analysis (www.insna.org) • http://www.slate.com/id/2180392/
Examples • http://www.nsf.gov/news/special_reports/scivis/follow_money.jsp • http://www.facebook.com/notes/facebook-engineering/visualizing-friendships/469716398919 • http://www.aaronkoblin.com/work/flightpatterns/
Subway Maps London Tube
Boston T • http://www.google.com/images?q=Boston+T&um=1&ie=UTF-8&source=og&sa=N&hl=en&tab=wi&biw=1031&bih=1376 • http://www.mbta.com/schedules_and_maps/subway/
Circular Layout + Edge Bundling • http://flare.prefuse.org/apps/dependency_graph
Tree Layout • Forcing a graph into a tree layout • Spanning tree • Hierarchical Layout
Sugiyama Method Images from van Dalen and Spaans (2001)
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
Force Directed Layout • Naïve Spring network (assignment 5) • Optimized Spring network (Barnes-Hut) • http://en.wikipedia.org/wiki/Barnes%E2%80%93Hut_simulation • Frauchterman-Reingold • Adds global temperature (simulated annealing) • http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.13.8444 • 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
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
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
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/ ShneidermanInfoVis 06
Vizster • Visualize social networking sites (Friendster, MySpace, Facebook). • Think 2005 when social network is just starting! • http://hci.stanford.edu/jheer/projects/vizster/ HeerInfoVis 05
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/ PererInfoVis 06
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
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
PNNL’s Graph Vis • Graph “Signature” Wong TVCG 06
Graphs as Maps http://www2.research.att.com/~yifanhu/MAPS/imap.html
Matrix Representation • An obvious alternative visualization of graphs is a matrix… GhoniemInfoVis 04
Matrix Representation How does one read a Matrix visualization? Importance of sorting… Henry InfoVis 06