NetLogo 7.0.0-beta2:

nw:louvain-communities

nw:louvain-communities

Detects community structure present in the network. It does this by maximizing modularity using the Louvain method. The communities are reported as a list of turtle-sets.

Often you’ll want to tell turtles about the community that they are in. You can do this like so:

You can give each community its own color with something like this:

Take me to the full Networks Extension Dictionary