Example of Facebook Friends Analysis

I often do social network analysis of Facebook data for people or communities, this page acts as an example to send people and place to have discussions around some of the work I do.

To do the analysis I use a GDF file containing the relationships of your friends, there is a good explanation of what a GDF file is here. A quick and easy way to create a GDF file is to use the Netvizz Facebook app, instructions and a video explaining how to generate a GDF file can be found at this post.  I find that around 150 friends is a good number to analyse, although we can go much bigger.

Community Detection Example

To detect communities of friends in your Facebook feed I use the Louvain method as implemented by Patrick McSweeney for Gephi during the Google summer of code. The method decomposes your friend community in to smaller sub communities. Figure 1.0 shows a network graph of my Facebook friends after running the algorithm. Each little dot on the graph represents a person and each line indicates that the these people are friends of each other. The algorithm has grouped the people in to communities and I have colour coded the graph depending on the community the person is in.

Figure 1: Community Detection using Gephi's implementation of the Louvain method
Figure 1: Community Detection using Gephi’s implementation of the Louvain method

In my example there appear to be four distinct communities with a number of smaller communities that seem to link the larger communities together. I can have a closer look at which of my friends belong to which groups and I can tell that the four major groups are: high school friends, family, friends from my current employment and friends from a previous employment. The small group in the middle that links them together is mostly made up of friends from primary school, my local area or college. We can explore these people further by examining there names and sex. The names of my friends have been added to the graph in Figure 2 and it has now been colour coded for sex, pink for girl, blue for boy and green for people who do not have their sex filled in on facebook. It is interesting that there is an area in the middle that is all boys, this is because my college and university degrees were in computer scientist related disciplines that were very male dominated!

Figure 2.0: Girls and boys in my facebook group, with names
Figure 2: Girls and boys in my facebook group, with names


It is interesting to find out who is influential, perhaps find the influental between different communities and friends. To do this I find the Betweeness Centrality measures of all the people in the network. Betweeness Centrality is a measure of the number of shortest paths between any two friends that pass through another friend. People with high Betweeness Centrality find themselves at the center of many relationship groups.  Figure 3 shows the nodes weighted so the names of the biggest gate keepers are shown:

Figure 3: Betweeness Centrality Measures
Figure 3: Betweeness Centrality Measures


An example video of exploring Facebook friends:



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.