Ranks who matters in a social graph: degree, betweenness, harmonic closeness, eigenvector, and PageRank centrality plus Louvain community detection over any edge list, via a tested CLI. Use when an agent needs to identify influencers, find brokers and bridge accounts, map communities, or pick seed spreaders in a network built from open data.
./install.sh social-graph-rankingname: social_graph_ranking description: Ranks who matters in a social graph: degree, betweenness, harmonic closeness, eigenvector, and PageRank centrality plus Louvain community detection over any edge list, via a tested CLI. Use when an agent needs to identify influencers, find brokers and bridge accounts, map communities, or pick seed spreaders in a network built from open data.
Turn an edge list into an answer to "who actually matters here." Computes five centrality measures, VoteRank seed spreaders, and Louvain communities, then cross-checks the measures against each other so the agent reports robust findings instead of one number. Built for networks an agent can legally obtain: Bluesky follow graphs, public datasets, mention/reply graphs, collaboration networks. See references/data-sources.md for what is actually collectible and what is not.
source,target[,weight] header, or SNAP-style plain src dst [weight] lines. For follower data, record source as the FOLLOWER and target as the account being followed. Anonymize handles before sharing the report.bash
pip install networkx
python3 bin/sg_rank.py edges.csv --directed --top 15 --out report.json
Flags: --format plain for SNAP-style files; --top N for ranking depth; --resolution for Louvain granularity (>1 finds smaller communities); --seed for reproducibility.
consensus_top lists nodes that rank in the top-N of two or more measures. A node that leads on every measure is a safe call. A node that leads on only one measure is a specialist; see references/measure-guide.md for what each specialty means.communities count, modularity, and community_sizes tell you whether the network has real subgroups. Modularity around 0.3 or higher means strong structure; near zero means one blob.--out report.json produces:
nodes, edges, directed, connected: graph basicsrankings: per-measure top-N lists of {node, score} for degree (or in_degree/out_degree when directed), betweenness, harmonic_closeness, pagerank, eigenvector (undirected, when defined)voterank_spreaders: top-10 seed nodes for maximum spreadcommunities, modularity, community_sizes: Louvain partition summaryconsensus_top: nodes in the top-N of 2+ measures, with which measuresbetweenness_sampled: true when exact betweenness was too expensive--resolution and compare.publisher key 2e43c913833850e6d80f939677e3de76e806d47785c0f1caaca90f9d18c98e1e
No ratings yet — be the first to rate it.