Contribute Media
A thank you to everyone who makes this possible: Read More

City attractiveness seen through Twitter

Translations: en


PyData Madrid 2016

Most of the talks and workshop tutorials can be found here:

How long would information originating from a given city require to reach any other city if were to pass from person to person only through face to face conversations? Or, what is the likelihood that information reaches a certain distance away after a given time period. We introduce a method to assess the attractiveness of cities using geolocated tweets as a proxy for human mobility.


Research on mobility has traditionally relied on surveys and economic datasets, generally composed of small samples with a low spatio-temporal resolution. However, with the increasing availability of large databases generated by the use of geolocated information and communication technologies (ICT) devices such as mobile phones, credit or transport cards, the situation is now changing. This is the reason why we focus here on geolocated tweets, which have already proven to be an useful tool to analyse world wide mobility and provide the ideal framework for our analysis. We use these geolocated data in two different contexts, relevant in both scientific and economic worlds.

Human diffusion and city influence

The study of competition and interactions between cities has a long history in fields such as Geography, Spatial Economics and Urbanism. This research has traditionally taken as basis information on finance exchanges, sharing of firm headquarters, number of passengers transported by air or tons of cargo dispatched from one city to another.

We have used Twitter data to track users and classify cities according to the mobility patterns of their visitors. Top cities as mobility sources or attraction points are identified as central places at a global scale for cultural and information interchanges. More specifically and assuming data reliability, we consider both the users’ displacements after visiting each city and the origins of each user within each city. Differences in the mobility for local residents and external visitors are taken into account, in such a way that cities can be ranked according to the extension covered by the diffusion of visitors and residents, taken both together and separately, and by the attractiveness they exhibit towards visitors.

Finally, we also consider the interaction between cities, forming a network that provide a framework to study urban communities and the role cities play within their own community (regional) versus a global perspective.

Touristic site attractiveness

Travelling is getting more accessible in the present era of progressive globalization. Over the last fifty years, geographers and economists have attempted to understand the contribution of tourism to global and regional economy and to assess the impact of tourism on local people.

We propose a ranking of touristic sites worldwide based on their attractiveness measured with geolocated data as a proxy for human mobility. Instead of studying the most visited places, the focus of the analysis was set on the sites attracting visitors from different parts of the world.

In particular, we propose three rankings of the touristic sites’ attractiveness based on the spatial distribution of the visitors’ place of residence. Then, we study the touristic site’s visiting figures by country of residence. And finally, we focus on users detected in more than one site and explore the relationships between the 20 touristic sites by building a network of undirected trips between them.

We have introduced a new method to measure the influence of cities based on the Twitter user displacements as proxies for the mobility flows. The method, despite some possible biases due to the population using online social media, allows for a direct measurement of a place influence in the world. We proposed three types of rankings capturing different perspectives: rankings based on “city-to-world” and “world-to-city” interactions and rankings based on “city-to-city” interaction.

Using a similar approach, we have analysed the influence and the attractiveness of a touristic site. Many different rankings of the most visited touristic sites exist, they are often based on the number of visitors, which does not tell us much about their attractiveness at a global scale.

In summary, we have illustrated the power of geolocated data to provide world wide information regarding mobility.


Improve this page