Complex Network Analysis in Python by Dmitry Zinoviev

Complex Network Analysis in Python by Dmitry Zinoviev

Author:Dmitry Zinoviev
Language: eng
Format: epub, pdf
Tags: Pragmatic Bookshelf
Publisher: The Pragmatic Bookshelf, LLC


Draw the Network

The size of the network generated in the previous section makes its visualization almost useless. However, the plotting fragment is still included in the case study. Nodes are painted by their kind: Entities are lightly colored, and Officers are dark.

panama.py

​ cdict = {​"Entities"​: ​"pink"​, ​"Officers"​: ​"blue"​,

​ ​"Intermediaries"​ : ​"green"​}

​ c = [cdict[panama0.node[n][​"kind"​]] ​for​ n ​in​ panama0]

​ dzcnapy.small_attrs[​"node_color"​] = c

​ pos = graphviz_layout(panama0)

​ nx.draw_networkx(panama0, pos=pos, with_labels=False, **dzcnapy.small_attrs)

​ dzcnapy.set_extent(pos, plt)

​ dzcnapy.plot(​"panama0"​)

The following figure shows the sketch of the network (naturally, without the labels). You can see with a naked eye that some components have an Officer in the center, surrounded by Entities; in some other components, conversely, Officers surround an Entity in the center.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.