Social Network Analysis: Calculating Degree with Gephi

In continuation to my earlier post on creating a Simple social network analysis using Gephi on the simple friends network. We will focus on the terminology “Degree” related to the Social Network Analysis in this post. In the previous example I used to Edge List in a CSV format to import the data to Gephi to obtain this social network which is very simple.


Degree is the edges incident on a node. According to Wikipedia, The degree of a node in a network (sometimes referred to incorrectly as the connectivity) is the number of connections or edges the node has to other nodes.

In this outcome are social network diagram you can see Siva has more number of Degrees which can be looked from the gephi as given in below given screenshot.

This shows the following attributes of Siva:

In-Degree: 4 (Vijay, Gopikrishna, Aditya, Kumar) – Head End Points at the Node

Out-Degree:7 (Ilango, Ramesh, Kannan, Aditya, Kumar, Vijay and GopiKrishna) – Tail End points at the Node

Degree: 11

According to Wikipedia, For a node, the number of head endpoints adjacent to a node is called the indegree of the node and the number of tail endpoints adjacent to a node is its outdegree.

Degree Distribution:

The degree distribution displays the count of nodes with the appropriate distribution. This example there are 3 nodes with the degree of 4 and one node with degree 1.

Step by Step Social Network Analysis using Gephi: Getting Started

In continuation to my previous blog post on Social Network Analysis using Gephi, I’m writing this post to explain how do create a very simple social network analysis using Gephi. You can also look at a very good introduction to Gephi written by Martin Grandjean here

Goal and Scenario:

We have a friends network we want to depict visually how the friends are interconnected with each other. The goal is to understand how to use Gephi Step by step along with having very fundamental understanding of how the data is represented.


* You would need the Gephi software which you can download from here.

* Data to be imported

* Fundamental understanding of what is a Graph, Node and Edge. (Please read more here ( To understand more visually please refer to this link.

Step by step Instructions:

Step 1: After you install Gephi, you will see a screen like this. Click New Project.

Step 2: In this example we are going to import that data from CSV files and we are going to use them for ease of use. Once you click New Project you will get the following Screen, then click Data Laboratory for importing data.

Step 3: Once you Open the Data Laboratory pane now you click Import Spreadsheet. First import the as table: “Nodes table” with browsing the Friends.csv. Then click next and Finish.

Which will result like the following once you click the finish button.

Step 4: Now you again click Import Spreadsheet. First import the as table: “Edges table” with browsing the Edges.csv. Then click next and Finish.

The results will be available once you click on the Edges in the Data Table as given below:

Steps 5: Now when you click the overview button right below the toolbar you can see the following network diagram created.

Red highlighted portion tells us that it has 8 Nodes and 15 Edges.

Step 6: We can use the Layouts to make it look little better using the Force Atlas 2 and Label Adjust to look clean and better.

We will try to get into more details in the next post with a different example.

Social Network Analysis using Gephi

When I came across a course on Social Network Analysis I came across Gephi. This post is a very simple attempt to give a very simple introduction of Social Network Analysis.

What is Social Network Analysis?

According to Wiki in simple terms it is analysis of social networks. Rather I would say it helps to analyze any data network. The key things which would be analyzed are is the mapping and measuring of relationships and flows between people, groups, organizations, computers, URLs, and other attributes. For example the given figure visually represents relationship between people.

In the future posts we will see more on using Gephi for Data Visualization for Social Network Analysis. Please read through a very good introduction on this topic and various other articles by Martin Grandjean on the subject.

What is Gephi?

According to “Gephi” is a Open source data visualization tool or all kinds of networks and complex systems, dynamic and hierarchical graphs.


Now we will have simple example of 8 friends how they are networked.


Here the nodes are the friends namely :











Each Id will have a relationship with another Id. Let’s see how they are linked based on how they have been closely related by introduction:









So to handle this with Gephi we can do it with the help of a CSV File, so we need two files which will be imported to Gephi. In my next post we will how do we do this step by step with Gephi.