Analyze the Network

Out of so many ways to analyze a network, let’s focus on degree and assortativity analysis. All network nodes have two attributes: kind (with three possible values Entities, Officers, or Intermediaries) and country. Let’s have a look at each of the assortativities, both directly and through the attribute mixing matrix (only for the kind).

 nx.attribute_assortativity_coefficient(panama0, ​"kind"​)
 nx.attribute_mixing_matrix(panama0, ​"kind"​,
  mapping={​"Entities"​: 0, ​"Officers"​: 1,
 "Intermediaries"​ : 2})
 nx.attribute_assortativity_coefficient(panama0, ​"country"​)
<= -0.9896603076687625
 array([[ 0.00000000e+00, 4.97403946e-01, 2.59605400e-04],
  [ 4.97403946e-01, ...

Get Complex Network Analysis in Python now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.