[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] how to "collapse" a network

From: Wet Bell Diver
Subject: [igraph] how to "collapse" a network
Date: Tue, 06 Mar 2012 00:19:27 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

Dear list,

I have the following two straightforward issues. I Have a dataset of connections between companies (-having a deal together).
The edglist would look something like:
'COMP 1' -- 'COMP 2'
'COMP 1' -- 'COMP 3'
'COMP 2' -- 'COMP 4'
'COMP 1' -- 'COMP 3'
'COMP 5' -- 'COMP 6'
'COMP 1' -- 'COMP 3'
'COMP 1' -- 'COMP 2'
et cetera, for a few thousand vertices (between 800 and 2500, depending on the continent)

It happens frequently that the same companies engage in multiple deals together, but each deal is represented by a line in my data. As a result, you see that 'COMP 1' -- 'COMP 2' occurs twice. I would like to be able to collapse this to a weighted edge list where 'COMP 1' -- 'COMP 2' occurs only once but with value 2, 'COMP 1' -- 'COMP 3' occurs only once having value 3, et cetera.
There must be a very simple way of doing this, but how?

Second, each company has several attributes, including industry. One of the things I would like to do is to collapse the entire company*company network into a weigted industry*industry network. This would reduce the network from approx. 2000*2000 to 40*40.
How can I construct such a weighted network in igraph?

thank you,
Peter Verbeet

reply via email to

[Prev in Thread] Current Thread [Next in Thread]