Build a graph of crates where edges represent correlations above or equal to a given threshold.
Compute node and edge betweenness centrality using a standard approach:
For each node, run a shortest path search and count the shortest paths going through each other node and edge.
This is Brandes’ algorithm for betweenness centrality.
Compute degree centrality: number of edges per node.
Display graph summary
Display the communities (connected components) found in the correlation network.
Display betweenness centrality top nodes
Display the top N nodes by degree centrality.
Find communities in the graph by extracting connected components.
Each community is a Vec of crate names.
Apply a simplified Girvan–Newman algorithm:
Perform hierarchical clustering using single-linkage based on crate correlations.