[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 583: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 639: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
Gephi forums •Beginner Question Re: Adding columns
Page 1 of 2

Beginner Question Re: Adding columns

Posted: 28 Jun 2011 18:57
by PMR3349
So I'm sure there is a simple solution to this, but a good amount of time spent with the documentation/wiki has not helped thus far (Probably because the wiki page is based on 0.7 and many of the options are different in 0.8).

I imported a network from a .net file (I have a lot of experience with Pajek which uses .net files as well) and go to the "data lab" I want to add columns to the data that the show up as ranking criteria. However, whenever I try to import a csv with the columns I want, none of them get associated with my nodes. Instead, the program creates new nodes and puts the columns there. I have tried with the "Force nodes to be created as new ones" box checked and without it checked.

So next I tried to just start a new project and import the entire network as a csv. That worked and made the data table look right, but then I couldn't select my custom columns as ranking criteria :cry:

I am near the end of my patience/sanity with this, probably because I know this is a really simple issue and it's most likely that I'm just being dumb. So to recap, All I want to do is add columns and use those values as ranking criteria. Please help!

Re: Beginner Question Re: Adding columns

Posted: 28 Jun 2011 19:30
by eduramiba
Hi,
To add some column to existing nodes you will need to have the ids of the nodes in the .csv file for each row so data laboratory knows what rows match to each existing node.

Your csv file can be something like:

Id;More columns...
1;more data...
2;more data...

Once you have this remember to uncheck "Force nodes to be created as new ones"

Eduardo

Re: Beginner Question Re: Adding columns

Posted: 26 Jul 2011 21:03
by PMR3349
I went on to find a work-around for this problem, but now I am on another project and need to get this working

Eduardo, I appreciate your help but that did not work. I currently have the following in the data lab:

Nodes,Id,Label,region
102925,1,102925,xxxx

etc....

when I import a csv file that is formatted exactly as you prescribed, with Id in one column and my new variable in the next, I still get the same problem. After import, it look like this:

Nodes,Id,Label,region,BMI
102925,1,102925,xxxx,[blank]

(until end, then..)

1,1,[blank],[blank] ,xxx

I don't know if that was clear but basically the data lab is still creating this imaginary set of new nodes and applying the data in the new BMI column to those instead of the original ones. Why? I have made sure the "force new nodes" box is unchecked and done everything else exactly according to your advice.

Re: Beginner Question Re: Adding columns

Posted: 26 Jul 2011 21:54
by eduramiba
Hi,
That may be a bug, can you share part of your csv?

It seems to work now for me just as you typed it.
Also you can have simpler files to add only the necessary column like the one I attach.

Eduardo

Re: Beginner Question Re: Adding columns

Posted: 27 Jul 2011 14:07
by PMR3349
Thanks for your cotinued help Eduardo

My csv is in the exact same format as yours, so I don't think that that's the problem. I'm worried that it may have something to do with how the network was imported in the first place. Could this be? Here's what the data lab looks like before I attempt to add the BMI column:

Image

Does that look right? I'm a bit confused by why the node label shows up twice and I suspect that that might be related.

Re: Beginner Question Re: Adding columns

Posted: 27 Jul 2011 15:07
by eduramiba
Yes it is correct, if there was no label, Nodes column would show the Id.

It is strange, the behaviour you are getting is like the 'Force nodes...' was checked. Just to be sure, it should be void, the opposite of this http://wiki.gephi.org/images/1/1f/Impor ... -nodes.png screenshot

Re: Beginner Question Re: Adding columns

Posted: 27 Jul 2011 15:18
by PMR3349
Yeah that's what's getting me so bothered about this. I am certain that I'm doing this without that box checked but as you said, it is behaving as if the box is checked.

::sigh::

Re: Beginner Question Re: Adding columns

Posted: 27 Jul 2011 16:13
by eduramiba
Agh, I can't see a problem in the code.
I assume the Ids on gephi don't have spaces or anything after the numbers right?

Re: Beginner Question Re: Adding columns

Posted: 29 Jul 2011 19:10
by eduramiba
PMR3349 sent me his file and I noticed that the problem only happened when loading a .gephi file.
I used a gexf as a workaround to solve the issue.

But the bug was this https://bugs.launchpad.net/gephi/+bug/818181 and it should be fixed now.

Re: Beginner Question Re: Adding columns

Posted: 26 Sep 2011 12:46
by gokose
Hi,

I have been reading the thread as I had the same type of problem with PMR3349. I am trying to add new columns to data table on gephi (version 0.8 alpha), from a csv format file containing node Ids with two extra columns. Eduardo mentions that the bug is fixed however I am still not able to import those two columns. It keeps inserting them as new nodes, although I unchecked the "Force nodes.." box..

Could you help please?
Thanks