gephi / gephi

Gephi - The Open Graph Viz Platform
http://gephi.org
GNU General Public License v3.0
5.87k stars 1.57k forks source link

Possible to export node coordinates? #1952

Closed sacrilicious closed 2 years ago

sacrilicious commented 6 years ago

Expected Behavior

Export calculated coordinates of nodes after layout is finalized.

Current Behavior

Unable to export calculated coordinates of nodes.

Possible Solution

Add an option to export X/Y coordinates for each node.

This would allow for the node positions to be merged into the data that feeds into Tableau.

Some forums linked to this plugin, but it is long out of date: https://gephi.org/plugins/#/plugin/recast-column

Context

I am looking into the possibility of importing social network coordinates into Tableau in order to allow end users to have an interactive figure.

I have tried exporting in various formats, but as far as I can tell there isn't one that contains the coordinates as determined by the various layout options.

The data is structured in pairs (Every connection / edge has 2 lines of data: one for the source and one for the target), with each line being mapped and a path being drawn between them. It is a bit of a workaround in Tableau as it results in multiple overlapping nodes and the network wouldn't adapt to filters in Tableau, but it would allow them to more easily find and highlight points of interest than a static image.

Your Environment

eduramiba commented 6 years ago

Hi, You can export to gexf and it will include that data, but it's XML and you will need to process it.

sacrilicious commented 6 years ago

Thanks! It looks like I can import the gexf file into excel to create a line listing, and then import into SAS (or other software) to pull out the ID and related coordinates. It's a bit of a process switching between formats and applications but it will get the job done.

eduramiba commented 6 years ago

Awesome!

DataWaveAnalytics commented 6 years ago

Do you have a script to get the positions of the final visualization? I couldn't import in excel to get a line listing as you described. Any ideas?

sacrilicious commented 6 years ago

Hi Csanhuezalobos,

Unfortunately I do not have a script for this. It required a manual multi-step process.

The process used was:

  1. In Gephi, File>Export Graph File>Save as .gexf file
  2. In Excel, open the .gexf file (you may get several warnings during this process, click OK for each to continue). The resulting spreadsheet will be broken into 3 sections: stratifying variables that were in Gephi, node info, and edge info. Each of these sections will have its own variables that are applicable to it.

So depending on what you wanted to do with the exported data, you will use these different sections.

In my case, because I was wanting to pull it into Tableau for an interactive SNA, I used the gephi-generated node coordinates from the node info section in the .gexf file and match them back into the data feeding into Tableau (which required a bunch of other prep/structuring).

aparamon commented 6 years ago

Please consider exposing node coordinates in the Data Laboratory table.

bill10 commented 5 years ago

yes, please. and if there is a way to use some columns as x,y coordinates for the nodes in gephi, that would be great. Again, it could be done with the recast-column plugin, but that plugin is long out of date and seems to be deserted by its creator.

Talamantez commented 3 years ago

From Gephi, if you activate Tools > Plugins > Available Plugins > JSON exporter, then you can choose File > export > Graph file and choose the 'JSON Graph File' option. The exported file includes the x,y coords of the nodes. This allows you to side-step processing a gexf file.

mbastian commented 2 years ago

Thanks, let me summarise.

Definition of done