[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 •Data Lab improvement: merging of rows
Page 1 of 2

Data Lab improvement: merging of rows

Posted: 15 Jun 2011 08:43
by admin
Hello,

I'd like to address a simple use case:

A graph is loaded, laid out, explored, but then the user finds two nodes that should be only one (say there is a "duplicate"). The user wants to merge the two nodes, not creating a meta-node because he wants to fix an error in the data.

The only way is to edit the graph file by hand, but this is tricky because you don't always know how to do that, and it's tricky to edit all edges related to the node we merge into the other one. And it is even harder to merge node attributes (keep one value, sum the values or average the values?).
The problem is the same when one wants to merge two edges.

So I'd see a new feature which, after selecting two rows, opens a panel to help the merge. What do you think about that?

Re: Data Lab improvement: merging of rows

Posted: 15 Jun 2011 21:52
by eduramiba
Hi,

So the user could merge 2 nodes only or any number of nodes?
I guess that the resulting node should have all edges that the nodes have (if not repeated).
To merge the attributes, the user could select an strategy for each column or just select 1 node to keep all its attributes, for example.

But how would edges merge work since graphs can't have edge duplicates?

Eduardo

Re: Data Lab improvement: merging of rows

Posted: 16 Jun 2011 09:54
by admin
Yes a merge strategy for any nodes is a good idea!
The node would indeed have any edges.

About the edges, we could let the user choose the new source and target from all the sources and targets of the merged edges. So we just create a new edge and remove the olders, but we can merge the attributes, which is the goal.

Re: Data Lab improvement: merging of rows

Posted: 16 Jun 2011 16:01
by eduramiba
Cool,
Then I think I will build a nodes and edges manipulator to do this with some basic strategies.

Eduardo

Re: Data Lab improvement: merging of rows

Posted: 16 Jun 2011 21:40
by elijah
This is an extremely common occurrence with my data. Fixing it by hand right now is tedious for any non-trivial changes and fixing it in the database requires that you reload the data and re-run your processing.

Re: Data Lab improvement: merging of rows

Posted: 20 Jul 2011 23:25
by eduramiba
I finally implemented this node merging and commited it to trunk (revision 2266) :) !

Steps to use it:
Select nodes to merge, right click, choose Merge nodes and choose an strategy for each column.

I hope it helps and you can use it soon. Also please report a bug if any problem happens.

Re: Data Lab improvement: merging of rows

Posted: 14 Nov 2011 16:23
by Josef_K
I am sorry but am I only one who has problem with this merging nodes?
It does not work well inside more complex network. I am trying to find where exactly problem occurs but basically happens when I try to weld more nodes with several edges, than not all of the edges (from old sub-nodes) are present.
It looks like it work good only with merging two nodes.

Re: Data Lab improvement: merging of rows

Posted: 29 Dec 2011 14:45
by eduramiba
Hi,
There could be some problem because assigning the edges is a bit tricky.

This feature first creates a new node.
Then for each edge of each node to merge creates an edge between the new node and the other node (undirected or directed depending on this edge) if possible. And if the other node is the same node it will create a self loop for the new node instead.
Finally deletes old merged nodes if desired.

Looking at the code I can see that sometimes the self-loop will not be created (would need to check if the other node is any of the nodes to merge). Is that the problem?

Can you show me an example of wrong behaviour with your data?
Eduardo

Re: Data Lab improvement: merging of rows

Posted: 13 Jul 2012 11:13
by ignacio.morer
Hi everyone,

I'm having trouble with this topic as well. I obtain duplicate nodes when I import data from a .csv. It happens when a node exists as source and target. The problem is that Gephi does not identificate duplicate nodes even though the information in all the columns is the same.

Any ideas on what is happening?

Thank you,

Ignacio

Re: Data Lab improvement: merging of rows

Posted: 16 Jul 2012 14:57
by eduramiba
Hi Ignacio,
Can you show some part of your file that is problematic?

Eduardo