Perform Blockmodeling

The construction of the graph of maximal cliques or communities is a special case of blockmodeling—grouping network nodes according to some meaningful definition of equivalence and replacing them with synthetic “supernodes.” A more general function nx.quotient_graph(G,part,relabel=True) takes a graph G and its partition part as a list of node collections (lists or sets), and creates an induced graph. Unlike nx.make_max_clique_graph and community.induced_graph, nx.quotient_graph requires the partition includes every node in the original graph at most once. You can manually remove the offending overlapping clique from a clique partition, if you want:

 cliques = list(nx.find_cliques(G))
<= [['Golf', 'Hotel', 'Foxtrot'], ['Echo', ...

Get Complex Network Analysis in Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.