Facebook Friends Graph — Plotting your social network together
While visiting profile of a friend, I noticed that he and I had about 70 mutual friends. Immediately it gave me the idea to plot the common friend connections and see what interesting patterns emerge in the larger picture. Something like this:
In the sample above, the names in circles (“nodes”) happen to be in my friend list. The connecting lines represent their own friendship status. For example, Saad Jasra and Hassan Ahmad are friends among themselves apart from being my friends on their own. Similarly, Ali Zeeshan Ijaz is a friend of both Saad Jasra and Abdullah Afaq Ali.
Luckily, Facebook API had Python bindings available which considerably simplified my task. Those, coupled with pydot, resulted in a
dot file with all the required connections. Graphviz did the remaining work:
(Click on the thumbnail for larger version.)
(Warning: The larger version is a
7329x5953 PNG image with a humongous file size of 13 MB. If your hardware specs are squeamish, don’t blame me if it brings your machine on its knees — this is not a DoS attack.)
Now came the intriguing part. The resulting graph was visibly split in two large portions. This resulted from the fact that I had spent a major portion of my life (15 years to be exact) in Saudi Arabia before moving to Pakistan. More interestingly, an old friend of mine from Saudi Arabia — Atif Sheikh — was also enrolled at my university in Pakistan. When I zoomed into the graph, I spotted him at the nexus of two networks. Similarly, the names in the middle of a network were the most connected people in that network. That is, the names congested in the middle of Pakistan network were friends from university and the names at the edges of that network were friends outside the university who didn’t share my academic connections.
I haven’t polished the code for a stable release yet as I doubt that other people would be interested in having gigantic plots of their social lives. Nevertheless, I’ll try to package it in form of a proper Facebook application in near future. After all, as I quoted in a previous post of mine:
Tags: Facebook, Facebook Friends Graph, Friends, Graph, Graphics, Internet, Open Source, PyFacebook, Python, Social Networking, Statistics, Technology, Web 2.0
“Statistics are like a bikini. What they reveal is suggestive, but what they conceal is vital.”
It would be great to have this as a Facebook app.! Nexus is a current facebook app. that does this (http://www.facebook.com/search/?q=nexus&init=quick#/apps/application.php?id=5303167721&ref=search&sid=1310493851.763276765..1), but it’s shutting down in early October.
Comment by Mike — October 2, 2009 @ 7:05 pm
Thanks for link Mike. Since I can’t host this application on a server (the computing cost of graphs would be too heavy for me to manage), I will release it as a desktop app soon.
Comment by krkhan — October 4, 2009 @ 12:34 pm
I would love to use this application! Plz who ever makes an application for this do give the name or download link over here!
Comment by Jehanzeb Malik — October 12, 2009 @ 10:03 pm
[…] Facebook Friends Graph — Plotting your social network together […]
Pingback by Facebook Friends Graph v0.1 | Inspirated — November 21, 2009 @ 12:01 am
visit Mybook http://gillardg.net/my
and see the diference with facebook
Comment by gillardg — March 17, 2010 @ 8:52 pm
[…] Inspirated Facebook Graph […]
Pingback by Great resources « Jasonohler’s Blog — January 13, 2012 @ 9:28 am