Force-parameters based on amount of links

Dear vizhub-community,

I have created this graph:

In the end, the graph should provide an overview on our applications (-> nodes) and their respective interfaces (-> links). As you can see, e.g. NAV (-> Microsoft Navision) is one of our key applications, at least from a “count of interfaces” perspective.

I would like to devide the nodes into 2 groups:

  • group 1 has more then 2 links
  • group 2 has 2 and less links

Based on these two groups, I would like to set the force-parameters to better show, what belongs together. I expect there to be 3 or 4 clusters.

I found an example of how to count the links, but I do not yet understand, where and how to put that into my code.

Any help is very much appreciated.

Take care,
Chris