O'Reilly logo

Complex Network Analysis in Python by Dmitry Zinoviev

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Read the Data, Build a Bipartite Network

As always, the script starts with a fat chunk of import statements.

 import​ ​pandas​ ​as​ ​pd
 import​ ​numpy​ ​as​ ​np
 import​ ​networkx​ ​as​ ​nx
 from​ ​networkx.algorithms.bipartite​ ​import​ sets, weighted_projected_graph
 from​ ​networkx.drawing.nx_agraph​ ​import​ graphviz_layout
 import​ ​scipy.spatial.distance​ ​as​ ​dist
 from​ ​scipy.stats​ ​import​ pearsonr
 import​ ​community
 import​ ​generalized
 import​ ​dzcnapy_plotlib​ ​as​ ​dzcnapy
 import​ ​matplotlib.pyplot​ ​as​ ​plt

Boston’s Justice Resource Institute generously provided the dataset for this project.[55] You can find it in the file jri_data.csv. The file is a correctly formatted CSV table with standard ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required