Map of Facebook Friendships

Paul Butler, and intern at Facebook, created this map of the world using ten millions online friendships:

I combined that data with each user's current city and summed the number of friends between each pair of cities. Then I merged the data with the longitude and latitude of each city.

At that point, I began exploring it in R, an open-source statistics environment. As a sanity check, I plotted points at some of the latitude and longitude coordinates. To my relief, what I saw was roughly an outline of the world. Next I erased the dots and plotted lines between the points. After a few minutes of rendering, a big white blob appeared in the center of the map. Some of the outer edges of the blob vaguely resembled the continents, but it was clear that I had too much data to get interesting results just by drawing lines. I thought that making the lines semi-transparent would do the trick, but I quickly realized that my graphing environment couldn't handle enough shades of color for it to work the way I wanted.

Instead I found a way to simulate the effect I wanted. I defined weights for each pair of cities as a function of the Euclidean distance between them and the number of friends between them. Then I plotted lines between the pairs by weight, so that pairs of cities with the most friendships between them were drawn on top of the others. I used a color ramp from black to blue to white, with each line's color depending on its weight. I also transformed some of the lines to wrap around the image, rather than spanning more than halfway around the world.

Link via Gizmodo

Newest 3
Newest 3 Comments

thanks for this post- a very interesting map. I'm surprised at how much of Asia (specifically the less developed parts) and Eastern Europe are.
I hope someone is making a t-shirt out of this!
Abusive comment hidden. (Show it anyway.)
Interesting. Just yesterday I was trying to picture a map like this, but somehow excluding all the "game only" friends. I'm "friends" with a couple hundred people around the world for the sole purpose of playing a specific facebook game, and that shouldn't really count as a real connection. I'm more curious how connected people really are.
Abusive comment hidden. (Show it anyway.)
Commenting is closed.

Email This Post to a Friend
"Map of Facebook Friendships"

Separate multiple emails with a comma. Limit 5.


Success! Your email has been sent!

close window