ggraph adapts the Grammar of Graphics from ggplot2 for network and graph visualizations. It integrates with tidygraph/igraph data structures, providing a wide range of geoms, layouts (e.g. hive plots, circlepacking), and layering methods tailored to hierarchical or relational data.
It uses two different solutions:
- placing of circles closest to the center from the largest to smallest, see brianshaler on github https://github.com/brianshaler/Circle-Packing-in-Processing
- simulation "real" world with use of a Java Physics Engine JBox2D, see http://www.jbox2d.org