PyCon APAC 2023

Network Analysis Made Simple (and fast!)
2023-10-26 , Tutorial 1

Through the use of NetworkX's API, tutorial participants will learn about the basics of graph theory and its use in applied network science. Starting with a computationally-oriented definition of a graph and its associated methods, we will build out into progressively more advanced concepts (path and structure finding). We will also discuss new advances to speed up NetworkX Code with dispatching.


Have you ever wondered about how those data scientists at Facebook and LinkedIn make friend recommendations? Or how epidemiologists track down patient zero in an outbreak? If so, then this tutorial is for you. In this tutorial will cover the basic of network analysis, we will use a variety of datasets to help you understand the fundamentals of network thinking, with a particular focus on constructing, summarizing, and visualizing complex networks. We will also cover recent changes in NetworkX which enables users to dispatch their code to more efficient backends like GraphBLAS to speed up their code.

By the end of the tutorial, participants will have learned how to use network thinking to better understand relationship problems while analyzing data. They will also be comfortable using the NetworkX API to model their data.

Part 1: Introduction

  • Networks of all kinds: biological, transportation, web.
  • Representation of networks, NetworkX data structures
  • Introduction to NetworkX API for modelling and graph operations.

Part 2: Hubs and Paths

  • Finding important nodes; applications
  • Pathfinding algorithms and their applications
  • Hands-on: implementing path-finding algorithms
  • Visualize degree and betweenness centrality distributions.

Part 3: Cliques, Triangles & Structures

  • Definition of cliques
  • Triangles as the simplest complex clique, applications
  • Using path-finding algorithms to find structures in a graph.
  • Open triangles as recommender systems.

Part 4: Speed up your code with NetworkX dispatching

  • Quick introduction to GraphBLAS
  • Moving between GraphBLAS and NetworkX.
  • Speed up your NetworkX code by changing one line of code!

I am currently working on the NetworkX open source project (work funded through a grant from Chan Zuckerberg Initiative!). Also collaborating with folks from the Scientific Python project (Berkeley Institute of Data Science), Anaconda Inc. Before this I used to work on the GESIS notebooks and gesis.mybinder.org.
I am also interested in the development and maintenance of the open source data & science software ecosystem. I try to help around with the Scientific Open Source ecosystem wherever possible. To share my love of Python and Network Science, I have presented workshops at multiple conferences like PyCon, (Euro)SciPy, PyData London and many more!