Electric Earth: Stunning map of the world created using Facebook friendships between cities




It looks like a view of the world taken from space, with major cities glowing with electric lights.

But this remarkable picture is actually a visualisation of millions of Facebook friendships between cities around the world.

The image was created by Facebook engineering intern Paul Butler who used data taken from the firm’s massive Apache data warehouse.

Mr Butler chose ten million pairs of friends between cities at random and then stripped away any information that could identify the people behind them.

The stunning 'Friendship Visualisation' shows pairs of friends between the world's cities. It was created by an intern at the company

He then combined that data with each user's current city and calculated the number of friends between each pair of cities. This data was then merged, in turn, with the longitude and latitude of each city.

As his visualisation progressed he realised it was creating a rough outline of the world.

On the firm’s blog he wrote: ‘I was interested in seeing how geography and political borders affected where people lived relative to their friends. I wanted a visualisation that would show which cities had a lot of friendships between them.

‘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 realised that my graphing environment couldn't handle enough shades of colour for it to work the way I wanted.’

To make it easier to understand, lines between cities which had the most pairs of friends were made thicker with the more friendships a link between two cities produced calculated as having more ‘weight’.

A colour chart was then used to illustrate these different weights, moving from black, to blue and finally to white for the ‘heaviest’ friendship pairs.

The result is an instantly recognisable picture of the Earth but one that has been mapped out entirely using Facebook friendships.

Major cities in the U.S. like New York and LA are covered in thick white lines while the UK and much of western Europe are also filled with colour.

Mr Butler writes: ' After a few minutes of rendering, the new plot appeared, and I was a bit taken aback by what I saw. The blob had turned into a surprisingly detailed map of the world. Not only were continents visible, certain international borders were apparent as well.



'What really struck me, though, was knowing that the lines didn't represent coasts or rivers or political borders, but real human relationships. Each line might represent a friendship made while travelling, a family member abroad, or an old college friend pulled away by the various forces of life.



'Later I replaced the lines with great circle arcs, which are the shortest routes between two points on the Earth. Because the Earth is a sphere, these are often not straight lines on the projection.

