https://github.com/miladfa7/social-network-analysis-in-python
Social Network Facebook Analysis (Python, Networkx)
https://github.com/miladfa7/social-network-analysis-in-python
analysis big-data facebook graph networkx networkx-graph python social-network
Last synced: 5 months ago
JSON representation
Social Network Facebook Analysis (Python, Networkx)
- Host: GitHub
- URL: https://github.com/miladfa7/social-network-analysis-in-python
- Owner: miladfa7
- Created: 2019-07-10T12:35:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-25T08:31:37.000Z (over 1 year ago)
- Last Synced: 2025-08-15T04:22:57.991Z (5 months ago)
- Topics: analysis, big-data, facebook, graph, networkx, networkx-graph, python, social-network
- Language: Jupyter Notebook
- Homepage: https://snap.stanford.edu/data/ego-Facebook.html
- Size: 4.22 MB
- Stars: 36
- Watchers: 0
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Social-Network-Analysis-in-Python (facebook)
Social Network Analysis in Python
Networks today are part of our everyday life. Let's learn how to visualize and understand a social network in Python using Networks
## Dataset information
The dataset you are referring to is the Facebook Social Circles Dataset, which is part of a collection of social network datasets. This dataset was collected by analyzing ego networks on Facebook, where an ego network is defined as a focal node (the ego) and all the nodes (friends) connected to it, along with the links (friendships) between these friends. The key aspects of this dataset include:
- Node Features: Information about individual users, although anonymized.
- Circles: Groups of friends, similar to how Facebook allows users to organize friends into different lists.
- Ego Networks: Networks centered around a specific user (the ego), including that user's friends and the connections between them.
**Key Statistics:**
Nodes: 4039 (representing users)
Edges: 88234 (representing friendships)
Clustering Coefficient: 0.6055 (indicating a relatively high level of clustering)
Triangles: 1.61 million (showing the number of friend groups that are fully connected)
Diameter: 8 (the longest shortest path between any two nodes)
Effective Diameter: 4.7 (90th percentile of the shortest path lengths between nodes)
https://snap.stanford.edu/data/ego-Facebook.html

## Some Social Network Analysis Methods and Examples
**1- Betweenness Centrality**
Betweenness centrality is defined as a measure of how often a node lies on the shortest path between all pairs of nodes in a network
```python
python scripts/betweenness_centrality.py
```
**2- Degree Centrality**
```python
python scripts/graph_degree_centrality.py
```
3- Closeness Centrality
4- Eeigenvector Centrality
5- Find shortest path
6- Find all neighbors the nodes
7- Degree Grapg
8- K-clique
9- K-core
10- pagerank