Turn long-format relationship data — who is connected to whom — into a networkx graph, then answer structural questions about it: who is central, who brokers connections, and how influence propagates.
Overview
The network_analysis module builds on networkx to convert tabular edge lists into graph objects and compute the algorithms that operate on them. Every function accepts the same raw edge-list arguments (source column, target column, optional weight and node-metadata tables), so analysts never need to construct a networkx graph by hand.
Key capabilities:
- Convert a long-format edge list DataFrame into a
Graph/DiGraph(orMultiGraph/MultiDiGraph), with a transparent report of dropped self-loops and duplicate edges - Attach node-level metadata (organization, type, country) from a separate lookup table
- Calculate degree, betweenness, closeness, harmonic, eigenvector, and PageRank centrality — with automatic ranking per measure
- Handle weighted graphs correctly, including the strength-vs-distance distinction that trips up naive centrality calculations
Use cases
- Identifying brokers or bottlenecks in a communication, transaction, or organizational network
- Ranking entities by structural importance rather than raw connection count
- Preparing relational data (call records, transactions, co-membership) for further graph analysis
- Intelligence and fraud analysis requiring an understanding of who connects to whom, and how tightly