[SOLVED] how to convert a txt file to gexf file?

All questions about the GEXF (see http://gexf.net before)
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
cookies713
Posts:3
Joined:09 Jun 2011 04:32
[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] how to convert a txt file to gexf file?

Post by cookies713 » 09 Jun 2011 04:45

Since my dataset is in txt file and the specific manifestation like this:
42051169 51923155 0
42051169 51923155 0.3
42051169 64029985 0.5
.........
so what can i do to meet the Gephi's requirement.Thank you!

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: how to convert a txt file to gexf file?

Post by admin » 09 Jun 2011 09:28

What is the meaning of the columns?

cookies713
Posts:3
Joined:09 Jun 2011 04:32
[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: how to convert a txt file to gexf file?

Post by cookies713 » 09 Jun 2011 10:31

admin wrote:What is the meaning of the columns?
It is about a social network dataset.To be specific,the first two columns give two participants' ID number,and last column lists the two users' relationship,which can be regarded as the uncertain edge existing probability of the graph.

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: how to convert a txt file to gexf file?

Post by admin » 09 Jun 2011 10:51

Ok so you should create a DL file to put the edge list.

The last column is can be seen as the "weight" of the edges. I advise to multiply the probabilities by 100 so that the layouts can use them properly.

So you'll have a file like this, given the 3 nodes of your example:

Code: Select all

dl
format=edgelist1
n=3
data:
42051169 51923155 0
42051169 51923155 30
42051169 64029985 50

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

Re: how to convert a txt file to gexf file?

Post by seinecle » 10 Jun 2011 08:04

Hi,

To complement what Sebastien said: once you have your dl file: open it in Gephi, then you can save it as a gexf file.

Best,

Clement

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