Skip to content

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.

License

Notifications You must be signed in to change notification settings

aymanmomin/Facebook-Ego-Network-Analysis-for-Political-Outreach-Optimization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Facebook Ego Network Analysis for Political Outreach Optimization

Network Visualization

📌 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

🔑 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:
    git clone https://github.com/yourusername/facebook-ego-network-analysis.git
  2. Install dependencies:
    pip install networkx pandas matplotlib python-louvain scikit-learn tqdm
  3. Download the dataset from Stanford SNAP 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
  • Libraries: NetworkX, pandas, matplotlib, python-louvain.

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published