Sunday, September 18, 2011

Force-Based Data Visualization

Using a combination of Slingshot! and Kangaroo Physics, this post demonstrates the self-organization of a complex data set. This approach is similar to the 2D tools available in graph visualizers such as Gephi.

The process uses the friend relationships on my Facebook network. This data is stored in a MySQL database and pulled into Grasshopper using Slingshot! The data set contains the names of all of my Facebook friends and their connection to my other friends. In 3D space, these connections are represented as lines.

When the data is first brought into the Grasshopper environment, the visualization is unstructured with name and connections scattered randomly in space.

Using Kangaroo Physics, the connection lines translate to force vectors which "push" and "pull" the names around. Based on relationships in the data, the 3D diagram will self-organize. Related friends cluster together using attraction forces. Friends with higher connectivity have a higher repulsion setting allowing them to be distinguished in the network.



The resulting structures are quite amazing. Navigating them shows a natural grouping of friends with some interesting granularity... For example: my relatives, work colleagues, and college friends exist in distinct clusters within the network. The source data does not inherently have these biases built in.

Interested in pulling your Facebook network information for some data viz? Check out this Gephi tutorial... Once you have it, you can store it in the format of your choosing.