[FIXED] Workaround to display multiple edges?

Once it's running
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
challenge
Posts:3
Joined:07 Jul 2011 22: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
[FIXED] Workaround to display multiple edges?

Post by challenge » 07 Jul 2011 23:29

Hello , New user to Gephi - tremendous tool . Impressive user interface. Clearly many hours of development behind it.....
Two questions:
1) Workaround possible?
I have a dataset in GDF format that contains multiple edges. Wish to be able to maintain linkage or horizontal alignment in the resultant graph between those edge pairs that repeat and rest of edge pairs in dataset.
When I import the dataset into Gephi as expected it clusters the multiple edges pairs and increases the weighting.
My problem is the "clusters" of multiple edged pairs that result lose their linkage to the source and destination edge pairs and become essentially autonomous.
The advice from this forum is that I should use the "edge attributes as a work around". I have tried this but the multiple edges remain clustered. I have considered splitting the dataset so that I generate two separate graphs and some how merge or overlay them if that was possible. Am I doing something wrong?Can anyone help me please? Chris
2) Rogue node
I note when I import the dataset into Gephi it generates a new "lone node" labelled "n33". Have I defined the dataset incorrectly?
Below is the sample of the import GDF and output from Gephi. Files are also attached...
GephiInputfileSimple.gdf
(2.9KiB)Downloaded 249 times
GephiGDFOutput.gdf
(3.98KiB)Downloaded 244 times
nodedef>name VARCHAR,label VARCHAR
s1,19453
s2,19531
s3,19521
s4,19433
.......
s30,19243
s31,19302
s32,19853
s33,19432

edgedef>node1 VARCHAR,node2 VARCHAR,label VARCHAR
s1,s2,try1
s2,s2,try2
s2,s2,try3
s2,s3,try4
s3,s3,try5
----------
s5,s4,try154
s4,s3,try155
s3,s4,try156
s3,s3,try157
s3,s33,try158
s33,s2,try159
s2,s1,try160
s1,s2,try161
s2,s1,try162
s1,s2,try163
s2,s1,try164
s1,s2,try165
s2,s1,try166
s1,s2,try167
s2,s1,try168
s1,s2,try169
s2,s2,try170

Export from Gephi
nodedef> name VARCHAR,label VARCHAR,width DOUBLE,height DOUBLE,x DOUBLE,y DOUBLE,color VARCHAR
s1,"19453",10.0,10.0,666.0603,594.88184,'153,153,153'
s2,"19531",10.0,10.0,668.3962,585.35956,'153,153,153'
s3,"19521",10.0,10.0,666.78204,503.15063,'153,153,153'
s4,"19433",10.0,10.0,660.14844,450.57648,'153,153,15
.....
s33,"19432",10.0,10.0,660.77374,547.2989,'153,153,153'
34,"n33",10.0,10.0,90.792854,-339.7922,'153,153,153'


edgedef> node1,node2,label VARCHAR,weight DOUBLE,directed BOOLEAN
s1,s2,"try1",6.0,true
s2,s1,"try160",5.0,true
s2,s2,"try2",3.0,true
s2,s3,"try4",1.0,true
-------
s28,s27,"try126",1.0,true
s29,s20,"try135",1.0,true
s30,s14,"try141",1.0,true
s31,s12,"try145",1.0,true
s32,s9,"try149",1.0,true
s33,s2,"try159",1.0,true

elijah
Gephi Community Support
Posts:169
Joined:11 Sep 2010 18:09
Location:Stanford, CA
Contact:

Re: Workaround to display multiple edges?

Post by elijah » 11 Jul 2011 04:52

When I built the Wikipedia edits dataset I used separate unique nodes for each "edit" to overcome the inability to have multiple author->page edges. So, if you have a typical dataset like so:

source,target,type
a,b,"red"
a,b,"blue"
a,b,"green"

Then you can transform it into:
source,target
a,"abred"
"abred",b
a,"abblue"
"abblue",b
a,"abgreen"
"abgreen",b

The problem is that this structure is problematic with the analytical tools in Gephi, especially when directed.

challenge
Posts:3
Joined:07 Jul 2011 22: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: Workaround to display multiple edges?

Post by challenge » 17 Jul 2011 08:59

Sorry for the late response. Thanks for the advice. I interpret your last comment to mean that while your suggestion is a work around it is not really recommended with Gephi.

Do I have no choice here but to reluctantly look for alternatives to Gephi in order to process multiple edges? If my conclusion is correct could anyone suggest a sensible alternative?

Also I remain puzzled by the "rogue node"that is generated by Gephi (see part 2 of my original submission).
Can any one advise what I am doing wrong here? Any comments gratefully appreciated since i am very much a beginner here. Christopher

elijah
Gephi Community Support
Posts:169
Joined:11 Sep 2010 18:09
Location:Stanford, CA
Contact:

Re: Workaround to display multiple edges?

Post by elijah » 18 Jul 2011 17:47

It depends on the purpose of your work in Gephi. If you're looking for graph statistics, you're better of with Network Workbench. If you're trying to represent patterns in the network and using network analysis to give a general outline of the form of the graph, then there's nothing wrong with the technique above and it won't void your Gephi warranty.

User avatar
pbittner
Gephi Plugin Developer
Posts:35
Joined:18 Mar 2010 23:03
Location:London, UK
[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: Workaround to display multiple edges?

Post by pbittner » 18 Jul 2011 18:41

I had a look at your dataset and the "rogue node" seems to come from the empty line between "s33,19432" and "edgedef>node1 VARCHAR,node2 VARCHAR,label VARCHAR". By removing that empty line, the nodes are loaded just fine.

challenge
Posts:3
Joined:07 Jul 2011 22: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: Workaround to display multiple edges?

Post by challenge » 19 Jul 2011 09:35

Thank you both for the very helpful, timely feedback. Based on your advice I will focus on Gephi in the meantime to gain further experience using my dataset (including removing that extra line! - somehow I always assume the solution must be complex and not consider the obvious)... I will also look at Network Workbench in the future (once I have a visual appreciation of my data ) because I need to derive some statistics .. Thanks Christopher

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