martes, noviembre 10, 2009

Do you know which is the most popular place in the World?

The answer is Paris, France. And its popularity almost doubles the second of the list: Berlin.

This answer, which seems rather intuitive (how many times have we heard “la cité de l'amour”, “let's escape to Paris”, and similar?) can be proven using several methods. The one that I have tried here is using a quite popular approach these days: Application Programming Interfaces (API) and Mash-ups. Here is a summary of this small study:

  • Objective: Check the most popular places in the World
  • Assumptions: For this study, I have assumed that the most popular place in the world is also the one most photographed.
  • Approach: I have divided the world into a grid of cells with resolution of 0.5º and 0.25º of longitude and latitude. Then query the web page www.panoramio.com using the Panoramio public API. This query returns the number of photographies that are registered in the server for a specified area as well with the link for these photographies, the user and so on.
  • Software: A program written in Ruby is responsible of going through all the cells, query Panoramio, parse the answer and store the number of photos for a given cell. The choice of Ruby is based on the fact that is able to request the queries in a compact way and also embeds regular expressions, which makes it extremely handy when parsing the queries. An alternative approach would have been to use c-shell scripts, wget, awks and greps, but with Ruby we have a more compact solution instead of bits and pieces. The maps shown in this blog entry have been created using Matlab and Google Maps. You can retrieve the code I've used in my programming blog.
  • Result: The top 10 cities obtained with this approach are collated in the following table.
Top 10 most popular places in the World. Number of photographies extracted from Panomario on 11th March 2009
Rank Place Number of photos
1 Paris 84049
2 Berlin 54578
3 Moskva 45655
4 Barcelona 45252
5 Budapest 43660
6 Madrid 43226
7 London 38698
8 New 35948
9 Venice 35789
10 Tokyo 35154

For a more general impression of the result you can look at the world map shown in Figure 1. Obviously on the oceans there are almost no entries, but the lack of entries evidence also inhospitable places such as the deserts (in Africa or Australia) or sparsely populated areas such as the Tibetan plateau, Siberian tundra or the Amazon jungle.

Figure 1: Popular places in the World (color scale is logarithmic)

One of the things that I would point out from this study is the high density found in overall Europe compared to the rest of the world (see Figure 2). Note that 7 out of 10 top places are located in Europe. Also, the coastlines are typically the places with more photographies, maybe caused by a generalized romantic outburst during sunset or sunrise, but this is only a guess.

Figure 2: Popular places in Europe (color scale is logarithmic)

Let me also play a little bit with the data and show you the next plot, which is a Google Maps API mashed up with the data retrieved from Panoramio. Since the data is rather bulky, the data covers only the Iberian Peninsula (even thought a similar map could also be done for any region of the world). Now you can check if your favourite Spanish town (“Moscas del Páramo” for instance) is popular or not.

Figure 3: Popular places in Iberian Peninsula

Obviously, this study is more a curiosity than a serious research study. However, at least you can use the information here provided in case you do not want to risk your summer holidays and visit a beautiful and popular place. Alternatively, if you want to avoid the crowds you can have a look at the maps and plan for an adventure trip. But don't make too much photos! Otherwise you will bias the system!

No hay comentarios:

Publicar un comentario