Over a million developers have joined DZone.

Open Source Tool Gephi: Center a Graph Around an Individual Node

DZone's Guide to

Open Source Tool Gephi: Center a Graph Around an Individual Node

· Database Zone
Free Resource

Learn how to create flexible schemas in a relational database using SQL for JSON.

I spent some time recently playing around with gephi – an open source platform for creating visualisations of graphs – to get a bit more insight into the ThoughtWorks graph which I’ve created in neo4j.

I followed Max De Marxi’s blog post to create a GEFX (Graph Exchange XML Format) file to use in gephi although I later learned that you can import directly from neo4j into gephi which I haven’t tried yet.

I loaded it into gephi and this is what it looks like:

Full graph
Filter menu top

There are massive numbers of connections between almost every node so it’s pretty hard to see what’s going on.

I wanted to be able to centre the graph around an individual person and see just the links related to them.

To do that we need to make use of an ‘ego filter‘ so the first step is to make the filters menu visible by clicking ‘Window > Filters’.

We can then choose the ego filter which sits under ‘Library > Topology’ and fill in the ID of the node that we want to centre the graph around as well as choose the depth of the traversal.

Filter menu bottom

In this case any traversal above 1 will end up traversing the majority of the graph since the average distance between nodes in this graph is just above 2.5.

I run the ‘Force Atlas’ layout algorithm over it and this is what we end up with:

My graph

My graph shows some interesting clustering of nodes where the ones on the right are people I worked with in India, top left are people I worked with in Australia, bottom left people in the UK and the ones towards the lower middle are people I went to ThoughtWorks University with.

There are a load of other filters to choose from but the ego filter is pretty cool!

Create flexible schemas using dynamic columns for semi-structured data. Learn how.


Published at DZone with permission of Mark Needham, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}