Here is an analysis of community structure for a 30-member hominid group at an upper division undergraduate level, and here is an analysis of members of a large corporate community as shown by email changes at an introductory graduate level. For interactive visualization, see.
Three libraries to consider: {graph}
(requires setting up the BioConductor R repository); [igraph]
(https://cran.r-project.org/web/packages/igraph/igraph.pdf); and tidygraph
. There are others, but avoid embarking on a never ending search for a best.
A graph is a mathematical object composed of nodes representing a collection of entities that are connected (or not) to other entities by edges. Notes with more than one edge are sometimes referred to as vertices. Edges have attributes, which include whether a connection between two nodes is uni-directional or bidirectional. A graph is said to be fully connected if every node can be reached by a single edge or by transversing two or more edges; otherwise, it is partial.
Attributes of nodes include centrality, connectedness, and groups of nodes may form cliques.
Converting data to a form a graph object can be done from a matrix, as briefly explained here or from a graphviz formatted plain-text file as shown by this example.