Python version: >=3.7
Networkx version: >=2.3
Last update: 22/11/2021

Chapter 2: Networks & Graphs

Networkx is a python library designed to provide support to analysis of complex networks.

In this notebook are introduced some of the main features of the library and an overview of its functionalities.

Note: this notebook is purposely not 100% comprehensive, it only discusses the basic things you need to get started.
A complete documentation (and tutorial) is available on the project website

Note 2: textbooks approaching network analysis (practice and theory) using networkx are:

  • "Complex Network Analysis in Python"
    Dmitry Zinoviev, The Pragmatic Programmer. 2018.
  • "Firstcourse in network science"
    Menczer, Fortunato, and Davis. 2020.

Importing the library

As a first step just import the networkx library.

import networkx as nx
import warnings
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
warnings.filterwarnings('ignore')