***** To join INSNA, visit http://www.insna.org *****
Absolutely I would back Dmitry in suggesting the use of Python in
order to merge networks as far as one avoids to use the relabelling
mapping employed in NetworkX (it's very problematic, I believe it has
to be rewritten). However, this is not the case here and so what I
would do is something like the following:
import networkx as nx
Ghuge = nx.read_graphml("HugeNetwork.graphml")
Gsmall = nx.read_graphml("SubsetNetwork.graphml")
NodesSmall = Gsmall.nodes()
G = Ghuge.subgraph(NodesSmall)
attributesDictionary = Gsmall.nodes(data=True)
nx.set_node_attributes(G, 'attribute', attributesDictionary)
On Thu, Jul 9, 2015 at 11:51 PM, Dmitry Zinoviev <[log in to unmask]> wrote:
> ***** To join INSNA, visit http://www.insna.org *****
> As far as I understand, you need to extract the subset of the original graph
> and then apply the node attributed. I would use Python for this:
>
> (1) Read the whole GraphML file and extract the node list.
> (2) Read the CSV file incrementally and save the edges that are adjacent to
> the nodes on the list into another CSV file.
>
> Once you are done, merge the new CSV file (which is presumably much smaller
> than the original file) with attributes.
>
> On Thu, Jul 9, 2015 at 4:45 PM, Caterina Desiato <[log in to unmask]>
> wrote:
>>
>> ***** To join INSNA, visit http://www.insna.org *****
>> Hi all,
>>
>> Any suggestions about ways to merge huge network files using very little
>> memory? I have a huge file with a long edge list (224m records) and a
>> separate file that has attributes for a subset of nodes in that edge list.
>>
>> I need to work on the subset only but I need to merge it with the network
>> data in the huge edge list–which our machines cannot handle working with.
>> Files are in csv and vna, the smaller subset is also in graphml (we
>> couldn't load the big one in R).
>>
>> Thanks!
>> cat
>>
>> Caterina Desiato
>>
>> Doctoral candidate
>> Communication and Information Sciences
>> Instructional Design Assistant
>> Distance Course Design & Consulting Group
>> University of Hawai‘i at Mānoa
>> [log in to unmask]
>> _____________________________________________________________________
>> SOCNET is a service of INSNA, the professional association for social
>> network researchers (http://www.insna.org). To unsubscribe, send an email
>> message to [log in to unmask] containing the line UNSUBSCRIBE SOCNET in
>> the body of the message.
>
>
>
>
> --
> Dmitry Zinoviev
> Professor of Computer Science
> Suffolk University, Boston, MA 02114
> _____________________________________________________________________ SOCNET
> is a service of INSNA, the professional association for social network
> researchers (http://www.insna.org). To unsubscribe, send an email message to
> [log in to unmask] containing the line UNSUBSCRIBE SOCNET in the body of
> the message.
_____________________________________________________________________
SOCNET is a service of INSNA, the professional association for social
network researchers (http://www.insna.org). To unsubscribe, send
an email message to [log in to unmask] containing the line
UNSUBSCRIBE SOCNET in the body of the message.
|