[SOLVED] Add metric attributes

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
fabio123
Posts:9
Joined:21 Feb 2011 09:35
[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
[SOLVED] Add metric attributes

Post by fabio123 » 21 Feb 2011 09:39

Hi,
I just want to add metric data (a column, In pajek this is called vector) to my network. How is this possible?
kind regards

User avatar
seinecle
Gephi Community Support
Posts:546
Joined:08 Feb 2010 16:55
Location:Lyon, France
Contact:

Re: Add metric attributes

Post by seinecle » 21 Feb 2011 11:34

Hi,

To do that you:
- switch to the "Data Laboratory" mode (see screenshot attached).
- Intuitive icons are available to add attributes, or vectors, to your nodes ("Add column" in your case).

Also, Gephi has a number of metrics available (see the statistics panel in Gephi). When you run these statistics, they are automatically added to each node as an attribute. For instance:

- in the overview mode, you select the statistics panel
- you click "network diameter" (or more exactly, you click "run" just on the right of "network diameter")
- select whether your network is directed or not. Click OK.
=> each betweenness centrality, closeness and eccentricity measure has been automatically added as new attributes (= new column) to each node. You can see that by shifting to the "Data Laboratory" view.

I hope it answers your question,

Best,

Clement
Attachments
Clipboard01.jpg

fabio123
Posts:9
Joined:21 Feb 2011 09:35
[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: Add metric attributes

Post by fabio123 » 21 Feb 2011 12:35

Dear Clement,
thanks for your fast answer. A part of the problem was, that I had gephi alpha and not beta installed. No I have the add column button. But my problem now is, that I have a txt list with data attributes (nominal and metric) in such a format:

1
5
3
3
2
5
...

The values in this list are in the same order as my network.
I would like to attach this partitions and vectors as attributes to the node, so that I can vary the size of the nodes corresponding to the vector and the color corresponding to the partition. I tried to import the values with the "Import spreadsheet" button, but here the values are attached as new nodes.
What can I do?
fabio

User avatar
seinecle
Gephi Community Support
Posts:546
Joined:08 Feb 2010 16:55
Location:Lyon, France
Contact:

Re: Add metric attributes

Post by seinecle » 21 Feb 2011 17:48

Hi,

Then what you could do is:
- open your graph in Gephi, switch to data laboratory view.
- export your nodes in a spreadsheet (say Excel), with "Export table" (you can also simply select all nodes with Ctrl + A, then copy-paste directly into Excel)
- export your edges in *another* spreadsheet.

- in the spreadsheet with nodes, add a column with the Pajek attributes you need.

- Open a new, empty project in Gephi. Switch to Data Laboratory view.
- Import your nodes from the spreadsheet with "import spreadsheet"
- Import your edges from the spreadsheet with "import spreadsheet".

I did not test it, but it sounds like it should work!

Best,

Clement

fabio123
Posts:9
Joined:21 Feb 2011 09:35
[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: Add metric attributes

Post by fabio123 » 22 Feb 2011 13:36

Hi Clement,
Thanks for your kind help. You suggestion worked. I had still a small problem wen I qnated to use my metric data as vector, to vary the sice of the nodes, because they were not coded as integer. I had to create a new column as integer and to copy the values. Is there I direct possibility to change string into integer or other variabe types?
kind regards
Fabio

P.S: I really like gephi a lot, it has cool features and is already very user friendly.

User avatar
eduramiba
Gephi Code Manager
Posts:1064
Joined:22 Mar 2010 15:30
Location:Madrid, Spain
[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: Add metric attributes

Post by eduramiba » 22 Feb 2011 14:16

Hi fabio123,
Data laboratory does not allow to change the type of a column, but you can duplicate it and choose a new type for it to be converted.

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