Node and edge counts and density are some of the macroscopic network properties. Let us now zoom into a network and look at it at the microscopic level—at the level of individual nodes and their neighbors.
The network neighborhood of a node is the set of all nodes adjacent to that node. Social network analysis pays particular attention to neighborhoods because that is where we find the relatives, close friends, and colleagues of the actor represented by the central node—in other words, the most socially significant alters of the ego. (Check Egocentric Networks, to refresh the meaning of the emphasized words.) Neighborhoods are responsible for the local properties of network graphs.
NetworkX offers two mechanisms for ...