Reputation: 1263
I have a small amount of csv data counting connections between different countries, with only three cols, e.g.:
I can use this (about 100 rows) to create a nice network vis in gephi where node sizes can be resized on degree
However, ideally I'd like the edges to be weighted in size/thickness based on how many connections... e.g. in the image about UK and USA are connected twice, so their thickness would be twice the size of Greece and Nepal's connecting edge.
Is there any way to generate these weighting values automatically, either in gephi or in excel?
The one problem is that the countries are not in a standard order between source and target (e.g. USA and UK in the example above are in different orders, UK coming in the source column for one connection and USA coming first in the source column for the other connection).
Basically, I just need a way to auto count the node connections to make a value for each edge popularity/occurrence. Thanks.
Upvotes: 0
Views: 6149
Reputation: 8375
Well, did this with two helper columns using match():
So, edited based on the comments and countif() to count multiple ocurrences:
=COUNTIF(F$3:F$12,"="&CONCATENATE(B3,C3))+COUNTIF(F$3:F$12,"="&CONCATENATE(C3,B3))
Upvotes: 1