Visualise your social graph on Facebook

We have just posted our experimental Social Graph application on Facebook. It offers Facebook users additional insight into their personal social networks, allowing them to identify different social clusters they belong to. In the work and life balancing game, the person with the biggest number of clusters, and not the person with the biggest number of friends, wins.

graph

The most interesting part in developing this application is its use of the so called spring-electrical-graph. It utilises a simple yet powerful algorithm for laying out entity-relationship diagrams (or graphs in a mathematical sense of the word). Any well laid out graph should keep the unrelated entities far from each other while keeping the related ones close. The spring-electrical-graph does exactly this by simulating an environment where all entities are electrical particles of the same charge while the related entities are connected via springs. The rest is left up to physics. The electrical particles repel each other via Coulomb’s law while the related ones pull each other via Hooke’s law due to the springs that link them.

The actual simulation is implemented using the 4th order Runge-Kutta method for solving ordinary differential equations. Other methods could be used as well but this one was particularly well suited for our use and I had the code available from my Binary Toys project.

While there are other social graphs applications already available on Facebook, Nexus being one of them, ours is a bit more interactive and fun to play with. But we are paying a heavy price for this interactivity in a form of performance degradation for users with a very large number of friends. As the repelling force acts between all entities all the time, for a user that has 1000 friends, we have to apply almost a million forces to our model. And we have to do that four times for the 4th order Runge-Kutta computation. For everything to run smoothly we would like to do all that at least 25 times per second, which takes our hunger for CPU power up to 100 million computations per second. We soon learned the hard way why Action Script 3 is still just a script, even though we love it.

Click this link to add the SWAT Social Graph to your facebook account: Social Graph

Related Posts

  1. In a Facebook world, what’s a social network to do?
  2. The Mark Zuckerberg Effect
  3. The Open Graph Protocol

Tags: , , ,

  • http://ashishtewari.wordpress.com/2009/06/30/what-do-your-friends-say-about-you/ What do your friends say about you? « Starting from Scraps

    [...] The individual clusters will also repel each other, moving into clear ‘continents’. See here for more details on the model) This creates an interesting theory – that the pattern of [...]

  • http://www.mihswat.com/2010/05/03/in-a-facebook-world-what%e2%80%99s-a-social-network-to-do/ In a Facebook world, what’s a social network to do? | MIH SWAT

    [...] via local language implementations and is now taking this further by also extending users’ social graphs and activities to the wider web through its Open Graph tools (announced at their F8 conference last [...]

  • http://www.mihswat.com/2010/11/27/the-mark-zuckerberg-effect/ The Mark Zuckerberg Effect | MIH SWAT

    [...] Just over a year ago we launched an experimental Facebook application that allows you to visualize how all your facebook friends are connected called the Social Graph. It offers Facebook users additional insight into their personal social networks, allowing them to identify different social clusters they belong to. You can read about how the Social Graph was developed in this introductory post. [...]

  • Ironjohn

    It’s great job….

  • http://www.facebook.com/augustocamargo Augusto Camargo

    It is not working anymore, you need to use HTTPS  now.

blog comments powered by Disqus