Home Wiki Blog Forum GEXF.net

Gephi forums

Community support

Getting my head around importing nodes

Once it's running

Getting my head around importing nodes

Postby nlgordaz » 22 Jul 2013 14:39

I've read the docs, but I can't seem to import nodes that also generate edges.

Specifically, I'm importing some data to use GeoLayout. I'm using the following tool because it lets you generate edges based on node selection.: http://tools.medialab.sciences-po.fr/table2net/

However, I would be open to directly importing the data into Gephi. The tool make it a little easier.

I've attached the cvs file with the long/lat coordinates, but I cannot import the data correctly.



Thanks,
Noah
Attachments
aussie-natural-disasters.csv
(5.21 KiB) Downloaded 72 times
nlgordaz
 
Posts: 16
Joined: 22 Jul 2013 06:48
Location: United States

Re: Getting my head around importing nodes

Postby admin » 22 Jul 2013 14:45

Go to Data Lab > Import Spreadsheet
select your file as a Node Table
cast latitude and longitude as Double instead of String

That's it, you can use Geo Layout!
User avatar
admin
Gephi Community Manager
 
Posts: 959
Joined: 09 Dec 2009 15:41
Location: Paris, France

Re: Getting my head around importing nodes

Postby nlgordaz » 22 Jul 2013 14:58

Great! That worked; I got the country shape.

However, it still doesn't generate edges, which is my biggest struggle. How can I get it to create the edges when I import?

Thanks again - incredible support here.
nlgordaz
 
Posts: 16
Joined: 22 Jul 2013 06:48
Location: United States

Re: Getting my head around importing nodes

Postby seinecle » 23 Jul 2013 15:01

Your file does not include edges - they are not generated by Gephi so you won't see them. Are the edges supposed to be generated by the Table 2 Net tool? If so how? (I am interested by this tool but did not understand so far how it works...)
http://www.clementlevallois.net
Gephi tutorials and personalized trainings: http://www.clementlevallois.net/training.html
Join the Gephi Facebook group for help and support: https://www.facebook.com/groups/gephi/
User avatar
seinecle
Gephi Community Support
 
Posts: 527
Joined: 08 Feb 2010 17:55
Location: Lyon, France

Re: Getting my head around importing nodes

Postby nlgordaz » 23 Jul 2013 15:40

Table 2 Net does create edges, but I don't think it will work for my file.

Gephi has created edges for my node import before.

When importing a node file, is there a way to generate the edges without having to do it manually for each edge? For instance, could I just designate one node type as the source and another as the target and Gephi will find all of the relationships automatically?
nlgordaz
 
Posts: 16
Joined: 22 Jul 2013 06:48
Location: United States

Re: Getting my head around importing nodes

Postby seinecle » 23 Jul 2013 16:02

That's not possible, because usually nodes are both sources and targets, so that you could not separate them in two groups. Example:
Node 1-> Node 2
Node 2 -> Node 3
Here Node 2 is both source and target.

The best would be, I suppose, to create the edges in a spreasheet before importing them in Gephi.

Best,

Clement
http://www.clementlevallois.net
Gephi tutorials and personalized trainings: http://www.clementlevallois.net/training.html
Join the Gephi Facebook group for help and support: https://www.facebook.com/groups/gephi/
User avatar
seinecle
Gephi Community Support
 
Posts: 527
Joined: 08 Feb 2010 17:55
Location: Lyon, France

Re: Getting my head around importing nodes

Postby nlgordaz » 23 Jul 2013 18:01

So when you import nodes you have to create each edge manually?
nlgordaz
 
Posts: 16
Joined: 22 Jul 2013 06:48
Location: United States

Re: Getting my head around importing nodes

Postby seinecle » 23 Jul 2013 18:11

Yes, but to say it differently: you have to provide nodes and edges ( => a network!) to Gephi so that it can visualize them. If no information is provided about edges, Gephi (or any other network software) cannot determine them, simply.

Again, the solution is to create edges in your favorite spreadsheet editor (Excel, ...) from your nodes. If an edge must be present for two adjacent nodes in your list of nodes, a simple formula should generate edges straightforwardly (if your nodes are in cells A1, A2, A3, etc. then in cell B2 you put the following formula:
Code: Select all
=A1+","+A2

Then you copy this formula to all cells in column B.

Best,

Clement
http://www.clementlevallois.net
Gephi tutorials and personalized trainings: http://www.clementlevallois.net/training.html
Join the Gephi Facebook group for help and support: https://www.facebook.com/groups/gephi/
User avatar
seinecle
Gephi Community Support
 
Posts: 527
Joined: 08 Feb 2010 17:55
Location: Lyon, France

Re: Getting my head around importing nodes

Postby nlgordaz » 23 Jul 2013 18:51

Thanks very much, Clement.

I see what you mean. Are you aware of software (like Net 2 Table) or a function in excel that creates relationships automatically between nodes (e.g., columns)? Or perhaps a Gephi plugin for this?

Have you worked with TouchGraph? It's another network graph software package, except it's not open source, there's no community, it's way over priced and it's not as flexibility or scalable as Gephi

However, it has one very useful feature that I can't seem to find with Gephi - it allows you to create edges for your nodes by simply relating node types together (not individually and you don't have to set up the edges in your spreadsheet beforehand - you just need columns of possible nodes).

check it out: http://www.youtube.com/watch?v=OCzK-EAcCUQ#at=211

Interested in hearing your thoughts.
nlgordaz
 
Posts: 16
Joined: 22 Jul 2013 06:48
Location: United States

Re: Getting my head around importing nodes

Postby seinecle » 23 Jul 2013 20:05

I watched the video: a Gephi plugin could be written to do that, but in its absence that's simple enough to do in Excel. In your dataset, how should your "entities" (nodes) be connected?
http://www.clementlevallois.net
Gephi tutorials and personalized trainings: http://www.clementlevallois.net/training.html
Join the Gephi Facebook group for help and support: https://www.facebook.com/groups/gephi/
User avatar
seinecle
Gephi Community Support
 
Posts: 527
Joined: 08 Feb 2010 17:55
Location: Lyon, France

Next

Return to How-To and Troubleshooting

Who is online

Users browsing this forum: No registered users and 1 guest