Seminar - NetworkX

Session pre-requisites.

At last week’s seminar, we learned about Python and Anaconda. To proceed with this seminar, you must sure that you have attended last week’s session and that you have installed Anaconda on your computer.

What is NetworkX

NetworkX is an open-source Python package used for network and graph data manipulation and analysis. It is widely used by transport analysts and modellers.

How are we going to use NetworkX

We will set up our environments to use Jupyter Notebook with the correct Python and NetworkX release versions. This is covered by the seminar in detail. The preparation, installation, and setup can take some time, so make sure that you dedicate time to do them correctly. The instructions on how to set up the environment and the basics of the Networkx library are summarized in the following presentation:

Seminar Introduction

View in Panopto


During the seminar, Leandro shared his screen to show the basics of NetworkX. In the links below, you can find the codes that were used. Jupyter Notebook, as well as HTML version, have been provided.

Jupyter notebook version

HTML version

We recommend that you carefully study all the above files and try to understand how they work. Should you happen to encounter any issues, do not hesitate to ask for help from the GTA team.

Datacamp (Optional)

There are particularly two Datacamp modules that use NetworkX. These are optional:

Further notebooks

More notebooks have been provided for your self-study. Particularly learning how to import nodes and links data and to implement coordinates of nodes will help you in the long run. The notebooks can be found here:

Network Algorithms - Jupyter Notebooks