Home Wiki Blog Forum GEXF.net

Gephi forums

Community support

GeoLayout

Extensions and customization

GeoLayout

Postby Alexis Jacomy » 14 May 2010 18:13

Hi all,

This thread is related to the new Gephi plugin, GeoLayout (here is the homepage: http://bit.ly/bflTBU). I heard that some people would be interested in a plugin like this, so you can ask your questions here.

Currently, the available projections are Mercator, Transverse Mercator, Miller cylindrical, Gall-Peters, Sinusoidal and Lambert cylindrical, but it's pretty easy to add some more from the formulae (x,y) = f(latitude,longitude) (most are available at http://bit.ly/2DVjQa).

So, for any question or suggestion (other useful projections/features, bugs, what next,...), here is the place!
Alexis Jacomy
Gephi Plugin Developer
 
Posts: 8
Joined: 11 Dec 2009 13:22

Re: GeoLayout

Postby mbastian » 14 May 2010 22:10

That is wonderful work. I'm sure that will be one of the most downloaded plugin!

I noticed an issue, the layout doesn't seem to work until I change the projection in the Projection Combo Box. Also I think checking the 'Center' checkbox by default would make more sense.

I used the airlines network dataset to see how it fits to the USA map from Google Maps. I used Mercator projection and it works well :-)

I attach the GraphML file with latitude and longitude, you can play with.

geolayout-airlines.png


I'm curious to see your plugin applied to real datasets, lots of fun I guess. Congrats!
Attachments
airlines.graphml.zip
(14.28 KiB) Downloaded 950 times
User avatar
mbastian
Gephi Architect
 
Posts: 728
Joined: 10 Dec 2009 11:11
Location: San Francisco, CA

Re: GeoLayout

Postby Alexis Jacomy » 14 May 2010 23:29

Oups, sorry for this, it has been fixed (it was an "orthographical" issue), and I agree with you about the initial value of center, so this has been changed to "true" (more user friendly, it prevents to search for the graph after the layout). The fixed version has been already uploaded. And thanks for the feedback!
Alexis Jacomy
Gephi Plugin Developer
 
Posts: 8
Joined: 11 Dec 2009 13:22

Re: GeoLayout

Postby quantanglement » 22 Jun 2010 16:57

Hi,

I'm new to Gephi (and XML, and this sort of network analysis in general). I'm trying to use GeoLayout to plot migration patterns across the U.S. I have an MS Excel file which contains the nodes, edges, the latitude/longitude coordinates of the nodes, and a column containing the edge attributes (which is a number which corresponds to the weighted number of individuals who move from one node to another).

Since the dataset I have is hierarchical-panel data, it is a huge file. Can someone provide some guidance on how to get/import this data into Gephi and use GeoLayout to plot it?

Any assistance is greatly appreciated!
quantanglement
 
Posts: 1
Joined: 22 Jun 2010 16:48

Re: GeoLayout

Postby Alexis Jacomy » 22 Jun 2010 19:34

quantanglement wrote:Hi,

I'm new to Gephi (and XML, and this sort of network analysis in general). I'm trying to use GeoLayout to plot migration patterns across the U.S. I have an MS Excel file which contains the nodes, edges, the latitude/longitude coordinates of the nodes, and a column containing the edge attributes (which is a number which corresponds to the weighted number of individuals who move from one node to another).

Since the dataset I have is hierarchical-panel data, it is a huge file. Can someone provide some guidance on how to get/import this data into Gephi and use GeoLayout to plot it?

Any assistance is greatly appreciated!


This thread is about the GeoLayout itself more than about the import/export questions (I think the place of your question is more here).

Nevertheless, you do not have to use necessarily an XML format (like GEXF) to import a graph with Gephi since Gephi can import CSV or GDF files (and some other formats here). It will probably require some do-it-yourself with Notepad++ (or equivalent) on a CSV export of your data, but it might be easier for you to use one of these formats (also, if you need examples of GDF and CSV files, you can directly export any graph you want from Gephi to this format).

Also, as soon as you can import your data in Gephi, including the latitude and longitude attributes, there might not be any problem to use GeoLayout on your graph.

Alexis.
Alexis Jacomy
Gephi Plugin Developer
 
Posts: 8
Joined: 11 Dec 2009 13:22

Re: GeoLayout

Postby mbastian » 22 Jun 2010 20:42

Hi, your problem fits to exporting your data in the GDF format, which looks like CSV.

So first export your node table as CSV (with coma as separator) and then edit your file in a text editor. Add a header like below:

Code: Select all
nodedef>name VARCHAR,label VARCHAR, latitude DOUBLE, longitude DOUBLE


The name column is basically your id, that your edge table uses.

Then export your edge table in CSV as the two first columns are the pair of nodes identifiers and the third is the weight. Append this to your GDF file and add the following header in between:

Code: Select all
edgedef>node1 VARCHAR,node2 VARCHAR, weight DOUBLE


You can add more attributes as columns also, Gephi will import them. To have the geolayout working, the latitude and longitude columns should be DOUBLE type.
User avatar
mbastian
Gephi Architect
 
Posts: 728
Joined: 10 Dec 2009 11:11
Location: San Francisco, CA

Re: GeoLayout

Postby maustwick » 15 Jul 2010 11:28

Hi all

My first post, so congratulations to everyone on a fantastic tool (both Gephi and GeoLayout).

I found that explanation of formatting GDF file *very* helpful, thank you; now, how did you produce the image with the US map behind it? Did you have to export into some kind of KML format and reopen the file or can you create the background map directly in the UI of GePhi?

Thanks!
maustwick
 
Posts: 1
Joined: 15 Jul 2010 11:17

Re: GeoLayout

Postby mbastian » 15 Jul 2010 23:57

I found that explanation of formatting GDF file *very* helpful, thank you; now, how did you produce the image with the US map behind it? Did you have to export into some kind of KML format and reopen the file or can you create the background map directly in the UI of GePhi?


I simply exported the graph as SVG and put the US map behind in Illustrator :)
User avatar
mbastian
Gephi Architect
 
Posts: 728
Joined: 10 Dec 2009 11:11
Location: San Francisco, CA

Re: GeoLayout

Postby rotten » 23 Dec 2010 00:11

I was experimenting with GeoLayout this afternoon (in 0.7 Beta) and imported a graph with no edges. (Just a bunch of locations around the world. (I was playing with sizing the nodes based on data about those locations.)

I'm trying to put several thousand nodes over a map. Thus far I've tried it with Protovis http://vis.stanford.edu/protovis/, and it worked, but the results were way too slow. So then I tried it with OpenLayers http://openlayers.org solution. That was even slower(!).

Gephi hardly bats an eye at laying out and allowing exploration of a few thousand nodes. Performance is great. I just need a map behind it.

SVG export and PDF export both threw NPE's.

FWIW, the GEXF export didn't throw an NPE however GexfExplorer didn't like it.

Are there any other ways to put a map behind the dots? (I can change my background color, it would be great if I could set a background map or image instead.)

I could try a screen shot and then image editing software. I'm not sure that is the best solution - if I just wanted that I could just take a screenshot of the Protovis or OpenLayers solutions. The problem is I'd like to be able to zoom in on areas of the graph, and pan around...


FYI - Save and reload as Gephi worked even though there were no edges. (As did all of the stats functions -- not that the results were all that interesting.).
User avatar
rotten
 
Posts: 33
Joined: 27 Aug 2010 15:42

Re: GeoLayout

Postby admin » 23 Dec 2010 11:55

Hi,

Please report the NPE's as bugs on launchpad: https://launchpad.net/gephi

SVG export is what you need, as we can't set background images.

cheers
User avatar
admin
Gephi Community Manager
 
Posts: 959
Joined: 09 Dec 2009 15:41
Location: Paris, France

Next

Return to Plugins, presets and filters

Who is online

Users browsing this forum: No registered users and 1 guest