Some of the most interesting structure in networks takes place not at the smallest or largest scales, but in-between. Groups of nodes and interrelations between those groups can reveal underlying affiliations, hint at functional similarities between nodes, and identify channels likely to spread contagions of diseases or ideas.
This chapter demonstrated how to find communities in NetworkX using Clauset-Newman-Moore modularity-based communities, as well as Girvan-Newman betweenness-based communities. The chapter also introduced cliques and k-cores, and showed how to use them to identify densely connected regions of a network. Communities, cliques, and k-cores provide the basic tools necessary to analyze the medium-scale structure of networks. The next chapter focuses specifically on social networks and their unique properties.