[SOLVED] Pajek color file format

Get help with your data
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
L.J.
Posts:22
Joined:01 Mar 2010 13:33
Contact:
[SOLVED] Pajek color file format

Post by L.J. » 01 Mar 2010 14:02

Hello

Me as many others have started with pajek (thanks to the book "Social Network Analysis with Pajek"), and is a great surprise that gephi supports .net file format.

In that file format, I can define node Id and node label, but if I want to define a node color, in Pajek I would write this:

679 " Ceratina sp." ic Maroon
680 " Acer rufinerve " ic LimeGreen

But Gephi do not recognizes "ic xxcolorxx" so I have no idea how can I establish node color from the file, or in a more elegant way...

How can I make a Partition and choose node color for each set of nodes???

Thanks!
Luis J.

PS: would be great a Gephi manual for dummies

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: Pajek color file format

Post by mbastian » 01 Mar 2010 14:25

Hi,

The colors are not well imported by our Pajek file importer. I filled a bug about that point.

Partition can be done on attributes, any data you associate with your nodes. Unfortunately Pajek file format don't allow attributes. I recommend you to convert your data in a GDF file (the format is close from Pajek format) and add a column.

For instance if you have 3 nodes, separated in two sets:

Code: Select all

ID         LABEL            MYCOLUMN
679      "Ceratina sp."      "PartitionA"
680      "Acer rufinerve"    "PartitionB"
681      "Unknown"           "PartitionA"
You can do this in GDF format (or GEXF) and you will be able to catch "MyColumn" as a partition field in Gephi.
PS: would be great a Gephi manual for dummies
I'm currently working on a Quick Start tutorial.

L.J.
Posts:22
Joined:01 Mar 2010 13:33
Contact:

Re: Pajek color file format

Post by L.J. » 01 Mar 2010 14:38

Surprisingly fast reply

That wolud be great if you fix that bug.

Actually I use matlab/octave to create my code, and I made a function to export networks as .net files, I suppose that I can create another function to export it in .gdf if it is so simmilar to pajek format.

Thanks!
Luis J.

theofj
Posts:2
Joined:08 Mar 2010 10:57
[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: Pajek color file format

Post by theofj » 08 Mar 2010 11:39

mbastian wrote:
You can do this in GDF format (or GEXF) and you will be able to catch "MyColumn" as a partition field in Gephi.
Hi mbastian

Do you by any chance have any information on how to do this in GEXF? My thesis partner and I are trying to use gephi as part of our thesis. We have coded a small gexf file builder based on a survey tool we are using, and would love to be able to assign partitions to our nodes.

Current we have the following attributes:

Code: Select all

     <attributes class="node">
         <attribute id="0" title="division" type="string"/>
         <attribute id="1" title="departmentnumber" type="string"/>
         <attribute id="2" title="departmentname" type="string"/>
         <attribute id="3" title="country" type="string"/>
     </attributes>
How can we turn these into partitions within Gephi?

Thanks in advance :)

Best Regards

Theo

Also, is there any chance that you could release the parts of your "Quick start" that are somewhat done, there is quite a steep learning curve to Gephi :)

admin
Gephi Community Manager
Posts:964
Joined:09 Dec 2009 14: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

Re: Pajek color file format

Post by admin » 08 Mar 2010 12:39

Hi,

The Quick Start tutorial is now online here! You may find your answer inside. ;)

Please post any suggestion on this thread.

theofj
Posts:2
Joined:08 Mar 2010 10:57
[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: Pajek color file format

Post by theofj » 08 Mar 2010 16:00

admin wrote:Hi,

The Quick Start tutorial is now online here! You may find your answer inside. ;)

Please post any suggestion on this thread.
Hi admin

Thanks! We will try looking at the guide, from my initial skimming it looks really good :)

It would however also be nice to be able to define the dimensions directly in the gexf file. Do you have any documentation on how to do this? :) A simple code snippet will do just fine.

Thanks a lot!

Best regards

Theo

admin
Gephi Community Manager
Posts:964
Joined:09 Dec 2009 14: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

Re: Pajek color file format

Post by admin » 09 Mar 2010 17:43

As you noticed, the GEXF format already allows you to set data attributes to nodes and edges. We can't encode partitions inside because partitions are a Gephi "usage" of grouping by one dimension, and GEXF aims only to encode network data, not what softwares do with them. Note that in the future, partitions may be created by combining multiple dimensions.

In Gephi, this kind of information is saved in ".gephi" files.

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