Visualizing Graph Databases Using Gephi

Ayushi Shrivastav
Dec 3, 2020 · 5 min read
The aim of this article is to demonstrate how to use Gephi, and an overall view of the software. [1]

What is Graph Database?

A graph is representation of data in terms of vertices and edges. The nodes hold information regarding the entity we are trying to relate, and edges are supposed to hold data regarding the relationship between two nodes. This data organization is based on graph theory. The edges can be directed or undirected, depending on the flow of relation.

Dataset Details

The dataset used in this example is Game of Thrones to visualize. This dataset constitutes a network and is given as a text file describing the edges between characters, with some attributes attached to each edge. This dataset was chosen as it is simple for the purpose of illustrating Gephi functions.

Importing Data in Gephi

There are three components in gephi:

  1. Data Laboratory: You will see that all the information about the graph data/network can now be seen as a data table, as shown in the following screenshot, with columns or attributes such as nodes, node ID, and node label.
  2. Preview: This mode lets you alter the way the final network will look. One can then export a snapshot of it into a required format such as a PDF or a PNG image file from this tab.
  1. Edges Table: The edge list CSV should include columns titled “Source” and “Target”, containing the node IDs of the start and end node for each edge, as well as any other edge attributes you would like to include. Gephi can recognize two more columns if you include them in your data: “Type” indicating the type of each edge (Undirected or Directed), and “Weight” containing the edge weight.
Edges Table for GoT network database in discussion
  1. Matrix: In this file format, the Rows and columns are the node labels and the relationship is indicated by 0 or 1.
How our graph is imported, with nodes Area and Symptom search term.

Visualizing the graph

Now that the graph is imported, the next step is to visualize the graph and tuning the visualizations. This is done in the Overview section of the workspace. Now, there are three tabs which will help you configure your graph:

  1. Layout: This tab can be a bit confusing since it comes with different names which you might not understand at first glance. My advice here is to just dive into it and play with it, and then read this article on details of what is the significance of each Layout is.
  2. Statistics: This tab will give you all the statistics for the graph in the workspace, with a graph representation wanted.
Statistics Tab of Gephi

Exporting the graph

For exporting the graph, you can go to the Preview tab. In this tab, you can tweak the final looks of the graph using the Preview Settings.

Other Visualizing Tools

  1. Neo4j: The downside of this application is to use the data and manipulate it, you need to know Cypher Query Language(CQL) and the tool is less for analysis and more for discovering relationships in your database. For in-depth visualization, you can use the extension Neo4j bloom.
  2. KineViz GraphXR: GraphXR is a browser-based interactive visual analytics platform. Neo4j has a GraphXR plugin, which takes the visualization to next level, with advanced options like GeoTagging and a VR space to move in. It is worht a try, just follow this tutorial!
  3. Keylines: KeyLines is a toolkit used by developers to build sophisticated and powerful network visualization applications. These applications run completely in a web browser and can therefore be easily integrated into existing systems and dashboards, or as standalone applications. I haven’t used personally, but give it a try!

The Startup

Get smarter at building your thing. Join The Startup’s +747K followers.

Sign up for Top 10 Stories

By The Startup

Get smarter at building your thing. Subscribe to receive The Startup's top 10 most read stories — delivered straight into your inbox, twice a month. Take a look.

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Medium sent you an email at to complete your subscription.

Ayushi Shrivastav

Written by

An Aspiring Data Scientinst, ML Engineer and AI Enthusiast. A writer by heart.

The Startup

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +747K followers.

Ayushi Shrivastav

Written by

An Aspiring Data Scientinst, ML Engineer and AI Enthusiast. A writer by heart.

The Startup

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +747K followers.