Getting started with Neo4j and Gephi Tool

Rutvi Pan
3 min readOct 17, 2021

--

Neo4j is a graph database management system developed by Neo4j, Inc. Described by its developers as an ACID-compliant transactional database with native graph storage and processing, Neo4j is available in a GPL3-licensed open-source “community edition”, with online backup and high availability extensions licensed under a closed-source commercial license. Neo also licenses Neo4j with these extensions under closed-source commercial terms.

Creating a new node

CREATE (databse:Database{name:”Neo4j”})-[r:SAYS]->(message:Message{name:”Hello World”})
RETURN databse,message,r

You can see that the 2 nodes is created and one relation called says is created using the query.

Now, Here I have used Movies database for demo purpose only, you can create by yourself just by clicking Create new. Start the Movies database and see the database in the Neo4j browser.

After that load the movie database to the neo4j and it will show the data in graph format.

MATCH (m:Movie) where m.released > 2005 RETURN m

MATCH (p:Person)-[d:DIRECTED]-(m:Movie) where m.released > 2010 RETURN p,d,m

Match (p:Person {name: ‘Tom Hanks’}) RETURN p

MATCH (tom:Person {name: “Tom Hanks”})-[:ACTED_IN]->(:Movie)<- [:ACTED_IN]-(p:Person) return p.name

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.

Open Gephi and click on New Project. Then choose File->Open and load the dataset of your choice.Below is how all the nodes and edges are displayed when initially data is loaded.

Now we can represent the data in various layout. In he left pane choose the layout option and choose the layout of your choice and click on Run. In the below image I have chosen the Fruchterman Reingold layout which displays the data in the following form.

To see the Data Table in the top Menu Bar select Window->Data Table

--

--

No responses yet