the_t_test_1
the_t_test_1

Reputation: 1263

Gephi - how to generate weight for edge thickness

I have a small amount of csv data counting connections between different countries, with only three cols, e.g.:

enter image description here

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

Answers (1)

Solar Mike
Solar Mike

Reputation: 8375

Well, did this with two helper columns using match(): enter image description here

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))

enter image description here

Upvotes: 1

Related Questions