You are on page 1of 57

The image cannot be displayed.

Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again.

Principles of Data Visualization

Network Visualization
Network Diagrams

Isabel Meirelles, Design for Information 2


They Rule Network Diagram

Josh On, http://theyrule.net/drupal/ 3


Human Disease Network Map

NYT, http://www.nytimes.com/interactive/2008/05/05/science/20080506_DISEASE.html?_r=0 4
Gephi
! Open Source Network Visualization & Analysis Software

! Written in Java on the NetBeans platform

! Uses a 3D engine to display graphs in real time

! Reads many file formats like Gephi, GEXF, GDF, XLSX, CSV,
GraphML, Pajek NET files and UCINET DL files

5
Network Concept
Every network consists of objects and
associations between them.
A
These objects and their associations in Gephi are
referred to as:
Edge Node
! Objects ~ Nodes
! Unique identifier of an object within a data set
! Associations ~ Edge
! Line that connects two nodes B

6
Edge Relationships
! Differentiating strong & weak relationships

A
Weak Rela/on Strong Rela/on

C B

Node Edge

7
Structuring Network Data
Two types of tables

! Node Table A
! Defines objects in the network with a unique identifier
! You must maintain a unique identifier column named
Id Start
! If you desire a description, maintain a column named
Edge Node
Label End
Node

! Edge Table
! Illustrates relationships between objects in the
B
network
! You must maintain a column named Source as the
Start node for the edge
! You must maintain a column named Target as the
End node for the edge
8
Gephi File Format

9
Node Sizing
Node Link Size
A 5 1
A B 2 2
C 1 3
Others 0 4

C D B

E F G

10
Example of Network Diagram

11
Gephi Visual Framework
! There are 3 major sections
! Overview Tab
! Data Laboratory Tab
! Preview Tab

12
Overview Tab

13
7 Overview Windows
! Network diagram and graph setup

14
7 Overview Windows
! Ranking, context and filtering

15
Overview - Statistics Pane
! Parameters for network data
! Exploration
! Analysis
! Spatialization
! Clustering
! Visualization
! Export

16
Modularity Class
! Measure of the division of networks into groups
! Higher modularity emphasizes dense connections between nodes
within a cluster and deemphasizes connections between nodes
outside of clusters
! Running the modularity class parameter creates definition of the
clustering

17
Modularity Class Example

18
Average Degree
! Number of unique edges or relationships connected to a node
! In-Degree number of unique relationships into a node
! Out-Degree number of unique relationships out of a node
! Degree number of unique relationships including in and out
! Average degree parameter runs creating definition for
clustering

19
In / Out Degree
Node C:
Source & Target
Average In Degree: 2
Average Out Degree: 3
Average Degree: 5 (2+3)

A C B

D E E

20
Average Degree
! Node size is determined by average degree

Node Degree Size


Homepage 8 1

Sports 3 2
Health / 2 3
World
Others 1 4

21
In Degree
! Node size is determined by average In-degree relationship

Node Degree Size


Others 1 1
Homepage 0 2

22
Out Degree
! Node size is determined by average Out-degree relationship

Node Degree Size


Homepage 8 1
Sports 2 2
Health / 1 3
World
Others 0 4

23
Weighted Average Degree
! Number of unique relationships including multiples
! In-Degree number of unique relationships into a node
! Out-Degree number of unique relationships out of a node
! Degree number of unique relationships including in and out
! Weighted average degree parameter runs creating definition
for clustering

24
In / Out Degree
Node C:
Source & Target
Average Weighted In Degree: 7
Average Weighted Out Degree: 10
Average Weighted Degree: 17 (7+10)

A C B
2 5

D E E

25
Average Weighted Degree
! Node size is determined by average weighted degree relationship

Node Degree Size


Homepage 20 1
Technology 10 2
Sports 7 3
Soccer 5 4
Science 4 5
World / 2 6
Health
Others 1 7

26
Average Weighted In-Degree
! Node size is determined by average weighted In-degree relationship

Node Degree Size


Technology 10 1
Soccer 5 2
Science 4 3
Others 1 4
except
Homepage
Homepage 0 5

27
Average Weighted Out-Degree
! Node size is determined by average weighted Out-degree relationship

Node Degree Size


Homepage 20 1
Sports 6 2
World / 1 3
Health
Others 0 4

28
Partition Window

! Assigning color coding to nodes


and edges based on parameters
like degree, modularity etc.

! Two sections for definition


! Nodes - Assigns color code
to the nodes
! Edges - Assigns color code
to the edges

29
Ranking Window
! Ranking calculated from
different statistical parameters
and sets the properties for the
nodes & edges
! Sizing criteria is defined from
the drop down like Weighted
Degree

! Two sections for definition


! Nodes Assigns color code
for node & node label
! Edges Assigns color code to
the edges & edge labels

30
Ranking Window for Nodes
Nodes
! Define a sizing criteria like Out
Degree
! Assign size to the nodes in the
graph
! Assign color to the node label
! Assign label size to the node

31
Filter Window
! Define filter criteria
! Attributes
! Dynamic
! Edges
! Operator
! Topology
! For instance filtering by
different attributes present
in the node & edge table

32
Attribute Filtering
! Filtering by Degree:
! Expand Attribute folder, then expand range folder
! Drag the Degree integer to the Queries section
! Select the range you want to view in the Range
Settings
Before
Filter

ANer
Filter

33
Context Window
! Number of nodes in the graph
! Number of edges in the graph
! Type of graph
! Directed
Directed
! Graph where edges point in a Graph
direction
! By default graphs imported from
CSV are directed graphs
! Undirected
Undirected
! Graph where the edges are bi-
Graph
direction

34
Force Directed Network Diagram
! Simulates a physical system to spatialize a network
! Most popular layout categories and also aesthetically very
pleasing
! Basic idea is to view nodes and edges clearly by moving
the nodes further apart
! These graphs assign forces between the set of nodes and
set of edges
! The forces keeps the graph in equilibrium
! Nodes represent steel rings, Edges represent springs
between the steel rings

35
Forces In Visualization
! Newtons Third Law: Force creates an equal and opposite reaction
! Attraction
! Forces act on oppositely charged objects, pulling them
together

! Repulsion
! Forces act on like-charged objects, pushing them away from
each other

! Gravity
! Forceofmovement toward the center

36
Force Directed Graph
! Click on the WORLD node and drag it

37
Layout Window
! Displays Layouts
! More layouts can be added as
plugins
! Selected examples
! Force Atlas 2
! Fruchterman Reingold
! Yifan Hu

38
ForceAtlas 2
! Improved version of ForceAtlas with Single Scale
! Allowing users to set repulsion levels for spreading the graph leading to better
readability
! Good tool for network analysis, or detecting behavioral patterns for very large
networks
! Suffers on overall accuracy as it handles very large network
! Graph is not the same always for the same network as it changes with the state of
the layout.
! Linlog Setting
! Checked: Linear Attraction and Logarithmic replusion
! Unchecked: Makes clusters more tightly bound when unchecking Linlog
settings
! Prevent Overlap
! Avoids larger nodes from obscuring view of the other components

39
ForceAtlas 2 Visualization
IniHal State Logarithmic
Repulsion
LinLog checked

Prevent
Overlap

40
Furchterman Reingold
! Standard Algorithm. Accurate, easy for the viewers
! Lengthy Runtimes. In order to understand & visualize the network data
clearly the layout needs to be run for sometime
! Displays a symmetrical view of the network
! Good tool for small or medium sized networks. Not suitable for Large
Networks.
! Works on the principle of gravity
! Uses a single option called Area function
! Either spreads the network apart or brings it closer together
! Places more burden on the algorithm which acts as a limitation

41
Furchterman Reingold Visualization

42
Yifan Hu
! Rapid computation speed compared to other force directed algorithms
! Easy to understand approach for rapidly viewing small or medium sized
networks
! Applies attractive and repulsive forces at the neighborhood level
! Uses generic way to set the springs/nodes apart by setting Optimal Distance
levels
! Measures the relationship between attraction and repulsion using Relative
Strength

43
Yifan Hu Visualization

44
Data Laboratory
! Nodes tab displays the nodes table
! Edges tab displays the edges table
! Add node / edges button adds additional entries
! Search or replace any specific entry from the tables
! Export the edges & nodes table
! Clear graph & edges table using the more actions button
! Upload CSV or Spreadsheet files here using import spreadsheet

45
Import Spreadsheet
! Click on the ellipsis icon and
select the nodes file for
import
! Select Nodes Table from
dropdown below As table:
! Click next, and adjust data
types as appropriate
! Click Next > Finish
! Check the nodes table entry
under the nodes tab

46
Import Spreadsheet (continued)

! Once the nodes table is uploaded, Click on the Import


Spreadsheet button again to import the edges table

47
Import Spreadsheet (continued)

! Nodes table after upload

48
Preview Window
! Allows you to change the node, node label, edge & edge label
settings for the graph

49
Browser Visualization
! Download the JavaScript
GEXF viewer
! https://github.com/
raphv/gexf-js

! Extract the folder and


place it on the desktop or
any other file location

50
Browser Visualization (continued)

! Export the Gephi File as a


GEXF file and then place the
file in the downloaded
JavaScript folder

51
Browser Visualization (continued)

! Double click on the JS folder


and then open the config.js file
using a text editor (Nodepad
++, Sublime etc.)
! Maintain your exported .gexf
file as highlighted below
! Right click on Index.html in
JS folder and then select open
with any web browser of your
choice

52
Browser Visualization (continued)

53
Summary
! Gephi is a network visualization and analysis tool
! Nodes are the objects
! Edges are the relationship between the objects
! Size of the node depends on the number of relationships
! Strength of the relationship between the nodes is depicted by
the thickness of the edge
! Gephi is divided into 3 major sections
! Overview tab
! Data Laboratory
! Preview tab

54
Summary (continued)

! Overview tab is used to manipulate visualizations


! Data Laboratory is used to import data
! Preview Tab visualizes the network

55
Gephi Data Sources
! CSV, Spreadsheet
! Web Services
! Custom Databases
! APIs
! Databases
! MySQL
! SQL Server
! SQLite
! Teradata
! PostGreSQL
! Any code written in JAVA
Export Gephi
Gephi files can be exported in the following file formats:
! PDF
! SVG Scalable vector graphics
! PNG
! Graph File
! .GEXF file
! Many other file formats
! One can also install more plugins to export the Gephi file in other
formats

You might also like