[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 preserve both sets of node attributes when merging nodes?
Page 1 of 1

How to preserve both sets of node attributes when merging nodes?

Posted: 05 Mar 2018 17:30
by mbrowning
I am having a problem with duplicate nodes that aren't technically duplicates, because their attributes are different.

For example, my node attributes are Label, DOB, Item Numbers. Node 1 and Node 2 have identical labels, but different Item Numbers. I want to concatenate the item numbers when I merge the nodes, so no information is lost:

Label DOB Item Numbers

Micaela 4/2/85 B, C, F
Micaela 4/2/85 Q, D

Ideal result:

Label DOB Item Numbers

Micaela 4/2/85 B, C, F, Q, D



Is this possible?

Re: How to preserve both sets of node attributes when merging nodes?

Posted: 05 Mar 2018 17:52
by eduramiba
Not possible to merge sets at the moment, sorry.

Re: How to preserve both sets of node attributes when merging nodes?

Posted: 05 Mar 2018 18:16
by mbrowning
It seems like the "join values with a separator" option does what I need, thank you.

When I do this, though, I notice that not all of the edges are preserved. If I merge three duplicate nodes, ideally, all those edges remain after the merge. Right now, it seems only the edges of one of the duplicates remain after the merge.

Am I missing something here?

Re: How to preserve both sets of node attributes when merging nodes?

Posted: 05 Mar 2018 18:29
by eduramiba
Hi,
Actually join with separator will add all values, but if they are repeated in several lists, it will have duplicates.

All edges should be preserved, but if some become duplicated, I think their weights are summed. Can you post an example?

Re: How to preserve both sets of node attributes when merging nodes?

Posted: 05 Mar 2018 19:31
by mbrowning
I think I figured it out, thank you! I had my id column labeled as something else, so an id column was created on importing the edges file, messing up the source and target IDs.