The basic features of NetworkX are contained in several Python classes that represent different types of networks. In particular, this chapter discusses Graph, DiGraph, MultiGraph, and MultiDiGraph. These classes can be used to represent, analyze, and visualize most networks. In this chapter, you will learn to use these classes to work with real-world network data in NetworkX. The code examples in this and future chapters will assume that you have already imported the networkx package.
In this chapter, we will cover the following topics:
- The Graph class: Understand the properties of undirected networks and how they are represented using the NetworkX Graph class.
- Attributes: How to associate data with nodes ...