Import Graph From Table-Based Database with Hierarchy

User's perspective on software quality
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Kapucha
Posts:2
Joined:31 Mar 2012 17:41
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Import Graph From Table-Based Database with Hierarchy

Post by Kapucha » 31 Mar 2012 17:56

This is my first post here.
First of all. The Gephi is a Fantastic, Awesome piece of software!!!

I used to work with it and with GeoLayout plugin. In my work I often create nodes that represent something on the earth. My nodes often have latitude and longitude properties.

This time I have to import about 5000 nodes from database (Mysql) that represent cities. In this database I have columns that tell me witch country this cities belong to, with province in country and with district in province. I would be lovely if Gephi can recognize those coumns (like recognice column label, id, type) and use it to create more than one level hierarchy graph so at the top level I have nodes represent countries then on the level down I have provinces in countries, on the level down I have district and on the bottom level I have nodes that represent cities.

Doing it manually is very time consuming. Can it be posiible. How to write such plugin? Is it even possible to do that?

I hope everybody understand my poor english and this idea that I described above.

User avatar
mbastian
Gephi Architect
Posts:728
Joined:10 Dec 2009 10:11
Location:San Francisco, CA
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Import Graph From Table-Based Database with Hierarchy

Post by mbastian » 31 Mar 2012 20:21

Hi,

Interesting use case. When you import your dataset from MYSQL it should already include the other columns. But what you want to do is use these columns to create a specific graph structure, hierarchical. This is something you could do by creating a new Import Processor in Gephi as a plugin. Processors are taking the input data (file, database import...) and create the graph structure. You could modify the default behaviour and use the additional columns to create a hierarchy.

Here is an example of a customized processor plugin
https://github.com/gephi/gephi-plugins- ... essor.java

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable