Hello,
Apologies if this question has already been asked. I have looked around, but cannot find any other instances.
I am having issues analysing a dataset. In the dataset I have some instances of multiple edges connecting the same two nodes. My problem, multiplied by a few thousand rows, is that I have something like:
A - B
B - A
A - C
C - B
What I would like to calculate is the number of neighbours that each node has.
I thought I could just calculate their degree, but this is influenced by the fact that some nodes are linked twice. So A's degree would be ranked 3 when it actually has 2 neighbours.
So my question is: is there a way to
a) rank nodes by number of neighbours instead of by degree
OR
b) merge duplicate edges with nodes in opposite order.
Thanks a lot!
Ranking Number of Neighbours
- 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: Ranking Number of Neighbours
Yeah, when you import the file, during import report you can choose the edges merge strategy
-
- Posts:2
- Joined:08 Nov 2017 13:08 [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: Ranking Number of Neighbours
Thanks, it works!
Daily lesson: make sure you are running the latest version of the software.
Daily lesson: make sure you are running the latest version of the software.

- 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: Ranking Number of Neighbours
Great! Yeah I forgot to mention you need 0.9.2