GeoLayout
-
- Gephi Plugin Developer
- Posts:8
- Joined:11 Dec 2009 12:22
- Contact:
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!
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!
- mbastian
- Gephi Architect
- Posts:728
- Joined:10 Dec 2009 10:11
- Location:San Francisco, CA [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: GeoLayout
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.
I'm curious to see your plugin applied to real datasets, lots of fun I guess. Congrats!
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.
I'm curious to see your plugin applied to real datasets, lots of fun I guess. Congrats!
- Attachments
-
- airlines.graphml.zip
- (14.28KiB)Downloaded 4704 times
-
- Gephi Plugin Developer
- Posts:8
- Joined:11 Dec 2009 12:22
- Contact:
Re: GeoLayout
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!
-
- Posts:1
- Joined:22 Jun 2010 15:48 [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: GeoLayout
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!
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!
-
- Gephi Plugin Developer
- Posts:8
- Joined:11 Dec 2009 12:22
- Contact:
Re: GeoLayout
This thread is about the GeoLayout itself more than about the import/export questions (I think the place of your question is more here).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!
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.
- mbastian
- Gephi Architect
- Posts:728
- Joined:10 Dec 2009 10:11
- Location:San Francisco, CA [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: GeoLayout
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:
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:
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.
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
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
-
- Posts:1
- Joined:15 Jul 2010 10:17 [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: GeoLayout
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!
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!
- mbastian
- Gephi Architect
- Posts:728
- Joined:10 Dec 2009 10:11
- Location:San Francisco, CA [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: GeoLayout
I simply exported the graph as SVG and put the US map behind in IllustratorI 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?

- rotten
- Posts:34
- Joined:27 Aug 2010 14:42
- Location:Columbus, Ohio [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: GeoLayout
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.).
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.).
-
- 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: GeoLayout
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
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