Community detection and colored plotting in networkx
Just came across this very easy library for community detection https://sites.google.com/site/findcommunities/ https://bitbucket.org/taynaud/python-louvain/src. Here’s how to create a graph, detect communities in it, and then visualize with nodes colored by their community in less than 10 lines of python:
It’s easy to get modularity to:
gave modularity: 0.8700238252368541
.