This project analyzes Facebook ego networks to optimize political outreach by identifying high-influence users and communities. Using network science techniques, we:
- Detect algorithmic communities (Louvain method).
- Compare them to user-defined social circles.
- Simulate influence spread via threshold models.
- Prioritize nodes for cost-efficient advertising.
Dataset: Stanford SNAP Ego-Facebook
- Network Analysis: Degree distribution, clustering coefficient, path length.
- Community Detection: Louvain algorithm vs. user-defined circles (Adjusted Rand Index).
- Centrality Metrics: Degree, betweenness, eigenvector centrality.
- Influence Simulation: Threshold model for targeted vs. random seeding.
- Visualizations: Network structure, community alignment, activation spread.
- Clone the repository:
git clone https://github.com/yourusername/facebook-ego-network-analysis.git
- Install dependencies:
pip install networkx pandas matplotlib python-louvain scikit-learn tqdm
- Download the dataset from Stanford SNAP and place it in /data/.
- Community Alignment: ARI = 0.144 (low overlap between algorithmic and user-defined groups).
- Top Central Nodes: Degree centrality outperformed other metrics.
- Influence Spread: Targeted seeding activated 92% of nodes vs. 7.8% for random.
- Dataset: Stanford SNAP
- Libraries: NetworkX, pandas, matplotlib, python-louvain.