Prince Ajudiya
4 min readSep 26, 2021

--

Practical-1 |Practical-2 | Practical-3 | Practical-4 | Practical-5 | Practical-6 | Practical-7 | Practical-8 | Practical-9 | Practical-10 | Practical-11| Practical-12 |

Practical:-10

AIM:-Getting started with Neo4j and Gephi Tool

This blog contains two different tools , Neo4j and Gephi tool for data visualization in graphical form .

Neo4j

Neo4j delivers the lightning-fast read and write performance you need, while still protecting your data integrity. It is the only enterprise-strength graph database that combines native graph storage, scalable architecture optimized for speed, and ACID compliance to ensure the predictability of relationship-based queries.

For using Neo4j tool , we can download neo4j or using via web browser . For this tutorial I am using web browser . Click here .

For this tutorial , I have use Movies Datasets which are by default available in the neo4j tool . After selecting the dataset I have performed various queries.

  1. Show movies that are released after the year 2006.

Query:

MATCH (m:Movie) where m.released > 2006 RETURN m
5 movies which are released after 2006

2. Query movies released after 2002 and limit the movie count up to 3only.

Query:-

MATCH (m:Movie) where m.released > 2002 RETURN m limit 3
3 movies were displayed

3. The below query returns the name of the person, director, and movie name that are released after the year 2007 up to a limit of 5.

Query:-

MATCH (p:Person)-[d:DIRECTED]-(m:Movie) where m.released > 2007 RETURN p,d,m limit 5
9 movies were displayed

4. If we want to know the list of the persons that are available in the database we can use the following which queries the list of people but limits the output up to 10 people only.

Query:-

MATCH (p:Person) RETURN p limit 10
displaying 10 nodes

5. If one wants to search whether a movie with a particular name is present or not the following query.

Query:-

MATCH (m:Movie {title: 'A Few Good Men'}) RETURN m
displaying 1 node

Gephi tool

Gephi is an open-source network analysis and visualization software package. It is mainly used for visualizing, manipulating, and exploring networks and graphs from raw edge and node graph data. It is an excellent tool for data analysts and data science enthusiasts to explore and understand graphs.

You can download gephi tool form here.

In this tutorial, I have chosen simple lesmiserables.gml dataset and performed some basic gephi operations on it. So let’s get started.

  1. First open the gephi tool and click on the new project. After that choose File->Open and load the dataset of your choice as shown below. And Load the dataset.
load the dataset

2. Below is how all the nodes and edges are displayed l after the load of the dataset.

display nodes and edges

3. Then After clicking on Layout and choose ForceAtlas and click on the run button.

image of ForceAtlas

4. For data table click on windows->data table.

data table

5. Next we can differentiate the nodes based on a various ranking like their In-Degree, Out-Degree, or Degree and show them in different colors. For this in the left pane on the top side choose Nodes->Ranking there choose the ranking like in the below image Degree is chosen.

Ranking of nodes and edges

6. Next we generate a Degree Distribution graph for Degree, In-Degree, and Out-Degree and also get the Average Degree value for all the nodes. for that click on the right pane choose the Statistics tab, and there run Average Degree in the Network Overview section.

average degree

7. Average degree report you see when you click on the run button in the above image.

Degree Reports

Conclusion

I hope now you can work by yourself in the Neo4j and Gephi tool for data visualization in graphical form . I tried to cover as many things as I can. Now you can explore more by yourself.

LinkedIn

https://www.linkedin.com/in/prince-ajudiya-40289819a/

--

--