https://github.com/aymanmomin/facebook-ego-network-analysis-for-political-outreach-optimization
Analyzing Facebook ego networks to identify influential users and communities for optimizing political advertising. Leverages network science techniques (Louvain communities, centrality metrics, threshold models) to simulate influence spread.
https://github.com/aymanmomin/facebook-ego-network-analysis-for-political-outreach-optimization
community-detection course-project facebook-network-analysis louvain-algorithm louvain-community-detection matplotlib network-analysis network-graphs networkx-library numpy pandas python3 pyvisgraph research-paper scipy-stats sklearn-metrics tqdm
Last synced: about 2 months ago
JSON representation
Analyzing Facebook ego networks to identify influential users and communities for optimizing political advertising. Leverages network science techniques (Louvain communities, centrality metrics, threshold models) to simulate influence spread.
- Host: GitHub
- URL: https://github.com/aymanmomin/facebook-ego-network-analysis-for-political-outreach-optimization
- Owner: aymanmomin
- License: mit
- Created: 2025-04-02T17:40:36.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-04-05T01:25:58.000Z (about 2 months ago)
- Last Synced: 2025-04-05T02:24:56.031Z (about 2 months ago)
- Topics: community-detection, course-project, facebook-network-analysis, louvain-algorithm, louvain-community-detection, matplotlib, network-analysis, network-graphs, networkx-library, numpy, pandas, python3, pyvisgraph, research-paper, scipy-stats, sklearn-metrics, tqdm
- Language: Jupyter Notebook
- Homepage:
- Size: 6.17 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Facebook Ego Network Analysis for Political Outreach Optimization

## 📌 Overview
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](https://snap.stanford.edu/data/ego-Facebook.html)
## 🔑 Key Features
- **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.## 🛠️ Installation
1. Clone the repository:
```bash
git clone https://github.com/yourusername/facebook-ego-network-analysis.git
```
2. Install dependencies:
```bash
pip install networkx pandas matplotlib python-louvain scikit-learn tqdm
```
3. Download the dataset from [Stanford SNAP](https://snap.stanford.edu/data/ego-Facebook.html) and place it in /data/.## 🚀 Usage
## 📊 Results
- 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.## 📚 References
- Dataset: [Stanford SNAP](https://snap.stanford.edu/data/ego-Facebook.html)
- Libraries: NetworkX, pandas, matplotlib, python-louvain.