January 2018
Beginner to intermediate
262 pages
6h 3m
English
Let’s start with a “black box” view of a complex network. Let’s pretend we are at a distance and instead of nodes, edges, and their attributes, we see a fuzzy grayish cloud. What can we tell about that cloud? Not much: only its size and density.
To be specific, in this chapter, we will experiment with the network of CNA-related Wikipedia pages constructed in Chapter 5, Case Study: Constructing a Network of Wikipedia Pages and available in the file cna.graphml.[33]
The size of a network is either its node count or edge count. You can measure both using the standard Python len function and other specialized functions.
| | len(G) # Number of nodes |
| | len(G.node) |
| | len(G.nodes) |
| | len(G.nodes()) |
| | nx.number_of_nodes(G) ... |
Read now
Unlock full access