Skip to contents

Computes a comprehensive set of global topological metrics for an input graph, including basic structure, connectivity, spectral properties, and complexity. Supports both igraph objects and data frames representing edge lists.

Usage

summarize_graph_metrics(graph)

Arguments

graph

An igraph object or a data frame with columns from and to representing an edge list.

Value

A tibble with one row and multiple columns, each representing a graph-level metric.

Details

Metrics computed:

  • Number of nodes and edges

  • Directed TRUE/FALSE

  • Graph density

  • Diameter and average path length of the largest connected component

  • Clustering coefficient (transitivity)

  • Degree assortativity

  • Average degree and betweenness centrality

  • Number of connected components and size of the largest connected component

  • Number of single nodes

  • Algebraic connectivity (second-smallest Laplacian eigenvalue)

  • Degree entropy (Shannon entropy of the degree distribution)

  • Gini coefficient of node degrees

  • Modularity of the community structure (via Louvain algorithm)

References

  • Newman, M. E. J. (2010). Networks: An Introduction. Oxford University Press.

  • Estrada, E. (2012). The Structure of Complex Networks: Theory and Applications. Oxford University Press.

  • Latora, V., Nicosia, V., & Russo, G. (2017). Complex Networks: Principles, Methods and Applications. Cambridge University Press.

  • Louvain modularity method: Blondel, V. D., Guillaume, J. L., Lambiotte, R., & Lefebvre, E. (2008). Fast unfolding of communities in large networks. J. Stat. Mech., 2008(10), P10008.

Examples

if (FALSE) { # \dontrun{
g <- igraph::sample_gnp(200, 0.05, directed = F)
summarize_graph_metrics(g)
} # }