How to Merge Datasets
Posted: 25 Aug 2017 05:57
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).
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).