Technical requirements
In this chapter, we will mostly be using the NetworkX and pandas Python libraries. These libraries should be installed by now, so they should be ready for your use. If they are not installed, you can install the Python libraries with the following:
pip install <library name>
For instance, to install NetworkX, you can use this:
pip install networkx
In Chapter 4, we also introduced a draw_graph()
function that uses both NetworkX and Scikit-Network. You will need that code any time that we do network visualization. You will need it for this chapter, and most of the chapters in this book.
For community detection, we will also be using python-louvain
. You can install it with the following:
pip install python-louvain
You can import it like this, which you will see later in this chapter:
from community import community_louvain
It is understandable if you’re confused by the installation and import commands for python-louvain
....