Hi all. I hope someone can tell me what the best way to merge multiple datasets is, when there's some overlap between the data.
I'm working with multiple DAGs (Directed Acyclic Graphs) from several data sources. I have to get the data manually, so I've been making the graphs by hand. However, the same node can appear in multiple data sources (accounting for different types of dependencies between the nodes).
What would make my life much easier is to create the graphs from each data source individually, give duplicate nodes a shared label to let gephi know to merge the nodes and use the edges that both nodes had.
A very simple example:
Data 1:
1->3
2->3
Data 2:
a->b
Shared nodes:
a=1
b=2
Merged result:
1->2
1->3
2->3
The only idea I've had come to mind (aside from doing it all by hand), is to export all my graphs to a file, concatenate them, manually combine nodes and fix their edges, the reimport to Gephi. However, I'd like to automate that process somehow as I'm sure it'll be very dull and repetitive (and likely to introduce errors).
How to Merge Datasets
-
- Posts:2
- Joined:25 Aug 2017 05:38 [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
- eduramiba
- Gephi Code Manager
- Posts:1064
- Joined:22 Mar 2010 15:30
- Location:Madrid, Spain [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: How to Merge Datasets
Hi,
This is easier in 0.9.2 Please download latest snapshot (pre-release) from https://github.com/gephi/gephi/#nightly-builds and follow these steps:
1. Import the desired files
2. During import report, select the 'Append to workspace' option instead of creating a new workspace
This is easier in 0.9.2 Please download latest snapshot (pre-release) from https://github.com/gephi/gephi/#nightly-builds and follow these steps:
1. Import the desired files
2. During import report, select the 'Append to workspace' option instead of creating a new workspace
-
- Posts:2
- Joined:25 Aug 2017 05:38 [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: How to Merge Datasets
Thanks. Haven't had a chance to try it yet, but I'm worried that while this will merge the datasets, it won't merge shared nodes across the various datasets.
- eduramiba
- Gephi Code Manager
- Posts:1064
- Joined:22 Mar 2010 15:30
- Location:Madrid, Spain [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: How to Merge Datasets
Hi,
It should merge nodes based on their ids correctly.
It should merge nodes based on their ids correctly.