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"​)
 nx.degree_assortativity_coefficient(panama0)
<= -0.9896603076687625
 array([[ 0.00000000e+00, 4.97403946e-01, 2.59605400e-04],
  [ 4.97403946e-01, ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.