Home Wiki Blog Forum GEXF.net

Gephi forums

Community support

Importing CSV Adjacency Matrix

Get help with your data

Importing CSV Adjacency Matrix

Postby Ferrets » 12 Mar 2014 16:07

Hey,

I'm a relatively new user so I was wondering if I could get help with a problem that has me stumped.

I have a 314x314 adjacency matrix where the first row and column are the id's of the nodes and the values within are the weights of the adjacency matrix (attached).

When I import it via Open in the file menu, I get no errors but my I'm given 408 nodes (it should be 313) and when I import it, the maximum weight is only 4 if I get rid of the repeated/unwanted nodes.

Can anyone help?

Thank you!
Attachments
EdgeMap.csv
The CSV adjacency matrix
(206.23 KiB) Downloaded 120 times
Ferrets
 
Posts: 1
Joined: 12 Mar 2014 16:02

Re: Importing CSV Adjacency Matrix

Postby francis_flavin » 13 Mar 2014 16:56

Presumably, you want the values in the adjacency matrix to represent weights, some of which could therefore be greater than the number of nodes you have (you might want to scale these weights, I think). If you look at this page, it says that edge weight should be formatted as a "double":

http://gephi.org/users/supported-graph- ... sv-format/

Looking at your data file, I see that the edge weights are formatted as integers. You might want to try formatting each edge weight to have a ".0" after it. I don't know if this will work, but it's worth a try. And, perhaps it would help to give your nodes alphanumeric names and give your weights explicit "double" or "float" values.

Good luck!


Francis
francis_flavin
 
Posts: 68
Joined: 21 Jan 2012 19:34
Location: Washington, DC, USA

Re: Importing CSV Adjacency Matrix

Postby francis_flavin » 13 Mar 2014 17:19

Here are some other things to try:

- replace zero weights with empty cells (otherwise, the importer will read it as an edge with zero weight).
- save your .csv file with UTF-8 encoding (that's just a rule of thumb I follow; I don't know if it makes a difference here).


Good luck!
francis_flavin
 
Posts: 68
Joined: 21 Jan 2012 19:34
Location: Washington, DC, USA

Re: Importing CSV Adjacency Matrix

Postby francis_flavin » 13 Mar 2014 17:21

You also might want to try using semicolons rather than commas, since that's what the example suggests. I rapidly tried a few permutations and received a couple of null pointer exceptions, but I didn't have time to trap the error.
francis_flavin
 
Posts: 68
Joined: 21 Jan 2012 19:34
Location: Washington, DC, USA

Re: Importing CSV Adjacency Matrix

Postby philippg » 05 Sep 2014 12:47

EDIT: I managed to figure this out once I had found this thread: viewtopic.php?t=2336

Hello all,

I have come across this thread since I am in the same position. My file looks essentially the same as that of the person who asked the question about this first. I have tried all the things that were suggested in this thread but have been unsuccessful. It would be good to know if it worked for the original author and/or if anyone else has taken the question raised in this thread further.

I also do not know what is meant by 'double'; what do I have to do to implement that suggestion?

Thanks for your kind help.
Philipp
philippg
 
Posts: 3
Joined: 05 Sep 2014 12:33
Location: UK


Return to Data Import / Export

Who is online

Users browsing this forum: No registered users and 0 guests

sports medicine portsmouth nh where to buy metronidazole