[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 583: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 639: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
Gephi forums •How to Merge Datasets
Page 1 of 1

How to Merge Datasets

Posted: 25 Aug 2017 05:57
by Moe Overload
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).

Re: How to Merge Datasets

Posted: 25 Aug 2017 12:17
by eduramiba
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

Re: How to Merge Datasets

Posted: 26 Aug 2017 08:11
by Moe Overload
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.

Re: How to Merge Datasets

Posted: 27 Aug 2017 17:50
by eduramiba
Hi,
It should merge nodes based on their ids correctly.