Global multi-layer network of human mobility

ABSTRACT Recent availability of geo-localized data capturing individual human activity together with the statistical data on international migration opened up unprecedented opportunities for a study on global mobility. In this paper, we consider it from the perspective of a multi-layer complex network, built using a combination of three datasets: Twitter, Flickr and official migration data. Those datasets provide different, but equally important insights on the global mobility – while the first two highlight short-term visits of people from one country to another, the last one – migration – shows the long-term mobility perspective, when people relocate for good. The main purpose of the paper is to emphasize importance of this multi-layer approach capturing both aspects of human mobility at the same time. On the one hand, we show that although the general properties of different layers of the global mobility network are similar, there are important quantitative differences among them. On the other hand, we demonstrate that consideration of mobility from a multi-layer perspective can reveal important global spatial patterns in a way more consistent with those observed in other available relevant sources of international connections, in comparison to the spatial structure inferred from each network layer taken separately.


Introduction
People travel from one country to another for different reasons and while doing so, a lot of them leave their digital traces in various kinds of digital services. This opens tremendous research opportunities through the corresponding datasets, many of which have already been utilized for different research purposes, including mobile phone records (Calabrese and Ratti 2006, Girardin et al. 2008, Quercia et al. 2010, vehicle Global Positioning System (GPS) traces (Kang et al. 2013, Santi et al. 2014, smart cards usage (Bagchi andWhite 2005, Lathia et al. 2012), social media posts (Java et al. 2007, Frank et al. 2013, Szell et al. 2014) and bank card transactions (Sobolevsky et al. 2014b(Sobolevsky et al. , 2014c(Sobolevsky et al. , 2015b(Sobolevsky et al. , 2016. By looking at these traces, we can reconstruct people's movements and afterwards analyze them to see if interesting or useful patterns emerge or to build models for predicting where people will travel next.
It has already been shown that results of such analysis can be applied to a wide range of policy and decision-making challenges, such as regional delineation (Ratti et al. 2010, Sobolevsky et al. 2013 or land-use classification (Pei et al. 2014, Grauwin 2015a. A number of studies focus specifically on looking at human mobility at urban (González et al. 2008, Hoteit et al. 2014, Kung et al. 2014, country (Amini et al. 2014) or global scale. When considering aspects of human mobility at global scale in particular, two major types of movements can be observed: an international migration (Greenwood 1985, Fagiolo and Mastrorillo 2013, Abel and Sander 2014, Tranos et al. 2015) and short-term trips explored for example through geo-localized data from Twitter (Hawelka et al. 2014, Sobolevsky et al. 2015a or Flickr (Paldino et al. 2015, Bojic et al. 2015b. Some studies tried primarily to explain and model global mobility (Greenwood 1985, Fagiolo and Mastrorillo 2013, Abel and Sander 2014, Tranos et al. 2015, while others rather focused on its applications, such as revealing the structure of the global society through the global mobility networks (Sobolevsky et al. 2013, Hawelka et al. 2014. Some scholars even considered relationships between human migration and economic links between countries Mastrorillo 2014, Sgrignoli et al. 2015). However, global human dynamics shows a complex nature containing various types of mobility, including such different processes as permanent relocations and short-term visits, and thus, cannot be fully understood through any single data source focusing on just one particular aspect of human behavior. Moreover, different sources might reveal different aspects of mobility also possessing different biases and limitations, so one source might complement another. In addition, recent studies provided methodological background to deal with multi-layer complex networks (Kivelä et al. 2014) which allows us to utilize their findings to build one network by combining different data sources.
In this study, we use three different sets of data each representing different kind of people's movements. Namely, Flickr and Twitter represent short-term human mobility (Sobolevsky et al. 2015a), while migration network contains information about a longterm one. Although Flickr and Twitter are similar in a certain sense, they show different types of people's activity, their usage while traveling and while at home also differs and they might correspond to movements motivated by different reasons (Li et al. 2013). Namely, Flickr mostly reflects activity during a leisure traveling and sightseeing, while in case of Twitter, its data mostly reflect activity during spare time with internet access available which can be performed during business trips as well as leisure traveling (Kiss 2011). Moreover, they are complement, as in some countries only one of these services may be popular and widely used by people.
Further, we provide a comparative study of different layers of human mobility. The specific focus of our study is on demonstrating that such a complex approach to human mobility, considering it from different short-and long-term perspectives, is of a vital importance: a multi-layer global mobility network shows patterns not seen from each layer separately. In order to evaluate our hypothesis, we applied a method of detecting communities in multi-layer networks and compared outcomes with those for the other existing international connections (language similarities, present or former colonial relations as well as trade networks). The results showed that communities detected in the three-layer network are on average much more similar to communities in the language, colony and trade networks than the ones observed in each layer separately.

Datasets
As our study aims at investigating human mobility from two different perspectives (i.e. longterm and short-term), we include three datasets where two of them capture short-term human movements such as touristic, personal or business travel, and one of them reflects long-term mobility such as people moving to another country to live there. In that sense, short-term human mobility is inferred from more than 130 million geo-tagged digital objects (e.g. videos and photographs) publicly shared on Flickr and more than 900 million geo-tagged tweets posted by 13 million users on Twitter, while long-term one is revealed from the United Nations official migration statistics (further discussion on the nature of human mobility represented by these datasets could be found in the Supplementary Information). Moreover, in order to compare mobility patterns determined in the aforementioned way and in some sense also to verify our results, we used three other datasets showing international connections: colonial dependency network, a network of languages shared by countries and a network of international trade.
The Flickr dataset used in our study contains more than 130 million photographs/videos and was created by merging two publicly available Flickr datasetsone coming from a research project (Mount 2010) and another from Yahoo 1 (Thomee et al. 2016). The records in two datasets partially overlap, but since each digital object in both datasets has its id, we were able to merge them by omitting duplicates and choosing only those records that were made within a 10-year time window, i.e. from 2005 to 2014. Since the Flickr data are quite sparse, we use 10 years' time span to gather more data and to avoid possible biases that could be caused by the dataset's sparseness. In Section 6 of Supplementary Information, we provide more in-depth discussion about the choice of the time frame and show that this choice does not affect results of our analysis. The second dataset on short-term mobility consists of the geo-tagged messages posted during 2012 and collected from the digital microblogging and social media platform Twitter. The data were collected with the Twitter Streaming API (Twitter 2013) and cleansed from potential errors and artificial tweeting noise as previously described by Hawelka et al. (2014).
In order to build a two-layer directed and weighted network that describes shortterm human mobility, we had to convert the Flickr and Twitter datasets into origindestination matrix where origins represent users' home countries and destinations are the places (i.e. countries) where users created digital objects or tweeted from. Since both datasets do not contain information about user home location, we had to determine it. Results from previous research showed that it is important to use the proper method for home location definition based on the context of the data (Bojic et al. 2015a). Taking this into account, we chose the most conservative method from techniques used in similar studies. Namely, we decided who of the users are acting in each location as residents based on the following criteria: a person is considered to be a resident of a certain country if this is the country where he/she took the highest number of the photographs/videos over the longest timespan (calculated as the time between the first and the last photograph taken within the country) compared to all the other countries for this person. Moreover, we omitted all users for whom timespan was shorter than 180 days (i.e. roughly 6 months) and who took less than 10 photographs/made less than 10 tweets. Usage of the timespan of at least 6 months ensures a high probability of preventing most of the cases of wrongly detected home location for Flickr users who just happened to demonstrate high activity during their occasional travel to a certain destination (which happens often for tourists getting excited about the place they visit), as we require them to perform repeated activity in their prospective home country over an extensive period of time. However, even though our method is more conservative compared to other methods used in the literature, it can still produce errors. We believe, however, that amount of such errors is low enough so that it does not affect the validity of the aggregated country-tocountry mobility analysis.
Using this simple criterion, we were able to determine the home country for over 500 thousand users in the Flickr dataset who took almost 80% of all the photographs/videos in the dataset (i.e. more than 90 millions in total), while the rest of the users, for whom home country could not be defined, mostly belong to a low-activity group taking photographs only occasionally. As described by Hawelka et al. (2014), all Twitter users were considered as residents of the country where they were most active. When constructing our multi-layer weighted and directed mobility network, we only considered users for whom we were able to determine their home country. Finally, two countries are connected with a link if there is at least one person from the first country that had some activity in the second country where the value of every weighted link in this network corresponds to the total number of users from one country that made digital objects or tweeted in the other one.
We should mention here that Flickr and Twitter are much more widely used in developed countries while penetration into some other countries can be quite low. Figure 1 shows how many users per one million of population from each country we determined to be active outside their homeland. We can see that penetration in China (mostly due to restrictive legal regulations) and India as well as in the most African countries is pretty low. About 75% of all the countries for Flickr and 45% for Twitter have less than 0.01% of their population ever using these resources abroad. However, this penetration rate of travelers recorded in the datasets can go up to couple of percent for some countries, while on average about 5% of the Twitter users and 3% of the Flickr users, captured by geo-located content they posted on corresponding service, were recorded traveling abroad.
The third layer was constructed using a dataset with statistics on number of foreign citizens or foreign-born population living in each country in July 2010. These data are publicly available and can be downloaded from the United Nations Department of Economic and Social Affairs website (United Nations 2015). This statistic is basically already provided in a form of an origin-destination matrix, making the process of extending the two-layer directed and weighted network on human mobility with one additional layer describing long-term human movements a very straightforward one.
Finally, to see how the constructed three-layer mobility network correlates with cultural and economic parameters, we created three separate networks of country relationships based on colonial dependence, common language spoken by people in different countries and bilateral trade between countries. In the first network of colonial dependence (Hensel 2009), two countries are connected if one of them was a colony or dependent territory of another one. Furthermore, the second network is a network of common spoken languages (Infoplease 2015) where two countries are connected if there is at least one common language that is official in both countries or spoken by the majority of the population in both of them. Unlike the first two, the third one is a weighted network of trade flows between countries obtained from the United Nations Commodity Trade Database (United Nations 2014) where the value of the link represents the amount of import/export (in US dollars) in 2012.

Quantitative and qualitative properties of mobility networks
Before getting to the analysis of the entire three-layer mobility network, constructed in the way explained in the previous section, we start from a comparative study of some basic quantitative characteristics of the network layers. We look at their differences and similarities, investigating if those different datasets effectively tell us the same stories about global human mobility or the different ones. Specifically, the main focus of this section is on the comparison of the long-term versus short-term attractiveness of the countries. Focusing on the countries' ability to attract foreign visitors, for this analysis we excluded loop edges from all the networks and considered a common measure of 'incoming degree centrality', which in our case of weighted networks becomes 'strength centrality'. We additionally consider the distribution of links' weights in order to gain insights from the overall composition of the international mobility fluxes.
Relative country attractiveness for the foreigners can be defined as the fraction of all people who travel outside their country of origin and come to that considered country of destination. It can be approximated as a normalized node incoming strength (i.e. as the sum of weights of all incoming non-loop edges to the given destination divided by the sum of all non-loop edge weights in the network). Strictly speaking this metric only represents a proxy to the actual country's attractiveness and is dependent on the representativeness of the data used to construct the corresponding mobility network. In the case of Twitter and Flickr, the last might be largely affected by the heterogeneity of the data coverage across the world. However, we believe that being evaluated at the global scale this metric is still useful for the relative comparison of the attractiveness of different countries, at least in the context of the social media activity. We also consider relative weights for each specific mobility flux between the two countries as the number of people moving between them normalized by the total number of people moving out of the considered origin. Based on Figure 2, which plots cumulative distribution function of normalized incoming strengths of the nodes, and Figure 3, that plots relative link weights for all three networks, we can conclude that all shown distributions are pretty similar to log-normal. Plot in Figure 3 shows that the distribution of links' normalized weights in the migration network has a value of variance much higher compared to two touristic networks. This means that the migration fluxes from each country are generally more diverse than the short-term mobility ones as seen from Flickr and Twitter networks. In order to explore the observed link diversity in more details, in Figure 4 we show a cumulative sum of the links' weights sorted in decreasing order. From this plot one can see what percentage of the entire network's flow is covered by a certain number of the heaviest links. For example, we can see that in the migration network top 1% of the links cover almost 40% of the entire network flow, i.e. total weight of 1% of the heaviest links equals almost 40% of the sum of all weights, and 10% of the links cover 90% of the flow. At the same time, those values are much smaller for the other two networks: 1% of the links cover about 20% and 25% of the flow and 10% cover only about 60% and 70% of the entire flow in the Flickr and Twitter networks, respectively. This observation can be explained by the fact that although locally for each country migration links are more diverse, globally for tourism there is a much broader choice of major destinations than for migration.
Finally, we calculate countries' ranks according to their foreign attractiveness (more details could be found in Supplementary Information). Figure 5 shows how a short-term attractiveness rank (averaged over Twitter and Flickr networks, to diminish heterogeneity of their coverage) correlates with a migration attractiveness rank. However, interesting stories are told by the outliers. Here we can see some very clear patterns. On the one side, there are prosperous Middle East countries like Saudi Arabia, Qatar, Oman, Bahrain, etc., that attracted huge amount of foreign manpower during the last century after vast reserves of oil were discovered in the region. In many of these countries, number of immigrants exceeds the local population. While being that attractive for professional migration, they are relatively less popular for short-term visitors, including tourists. And on the other side, there are less prosperous countries like highly populated Southeast Asian countries: Indonesia, Philippines and Vietnam, not so much attractive for migrants, but relatively cheap for tourists and offering very interesting natural attractions such as Bali and Phu Quoc, just to name a few, which makes them primary touristic destinations. Needlessness to say, there are also highly developed countries such as the United States, the United Kingdom, Germany, etc., with very well-established tourism, plenty of business visitors and lots of incoming migrants, being highly ranked in both short-and longterm attractiveness. In Supplementary Information, we also compare countries by their per capita performance in attracting foreign visitors measured as a number of visitors divided by country's population. This metric might be useful for the analysis of the relative strengths of personal and business ties, which are strongly related to the number of people living in the country.
Although results of our analysis presented in this section showed that all three networks share some common properties, at the same time they differ in many aspects. Common features of networks reflect certain facts about different types of countries: the most developed countries are popular for both types of visitors, but then again there are also countries attractive only from one side. Moreover, it has been shown that the migration flow is much more concentrated around just couple of pairs of origin/destination countries, while tourists have a larger variety of choices when deciding which place to visit next.

Modeling mobility
One common goal that many studies on human mobility share is to predict mobility flows. Although over time several different models were proposed, still most of the related works rely on the classical gravity model (Zipf 1946, Barthélemy 2011. The  model takes spatial population distribution including distances between different locations as an input and predicts mobility fluxes with respect to several model's parameters. The values of those parameters are either assumed or have to be estimated from partial knowledge of the network. Recently, an alternative parameter-free radiation model has been suggested (Simini et al. 2012), which allows to predict human mobility just based on the spatial distribution of the country population without any parameters to fit. However, the radiation model in turn relies on some partial knowledge of the mobility network as specified below. We compare performance of these models on our global mobility network and use them to reveal and compare patterns behind the three layers of this multi-layer network. Classical gravity model tries to predict number of people moving from the origin i to the destination j as w ij ¼ C , where d ij is the distance between i and j, pop i is the population of i, C is a global normalization constant ensuring that the predicted total activity is the same (or on the same scale) as observed and α is an adjustable parameter of the model. However, while the populations of the destinations are useful for understanding how the outgoing mobility from each origin should be distributed, the population of the origin might not be the most relevant parameter for our networks due to high differences in penetration level of Flickr and Twitter across populations of different countries. To address this network heterogeneity, we used the total amount of outgoing mobility s out i observed in the network instead of the population pop i of the origin i. This will also help for a fair comparison between gravity and radiation models because the last, as we will describe below, specifically relies on the knowledge of s out i . Therefore, in our case the final expression for predicting a flux from i to j is given by We also consider a 'locally normalized' version of the gravity model, i.e. gravity model in a form: This type of constrained model is rooted in the earlier work of Wilson (1967) and more recently presented by Sagarra et al. (2013) and Grauwin et al. (2015b).
Unlike gravity, radiation model is claimed to be parameter-free. It uses only population distribution to predict the flux of people as where s ij is the population within circle with center at i and radius equal to the distance between i and j excluding population of i and j, and s out i as before represents the total number of the commuters from i. However, it is worth mentioning here that the model still depends on the knowledge of s out i . Masucci et al. (2013) adjusted the radiation model, introducing the appropriate normalization factor for finite systems. After incorporating this factor, we came up with equation that we used in our experiments in a form of After fitting the gravity model and its 'locally normalized' version on the logarithmic scale, together with constructing the radiation model for the three layers of our multi-layer mobility network, we got results presented in Figure 6. From the figure and values of R 2 presented in Table 1, we can conclude that for all three layers the gravity modelboth classical and locally normalized versions -fit much better for the appropriate choice of the parameters. For that reason, in our further analysis we will only use the gravity model.
Worth mentioning is that sometimes other parameters are introduced to the gravity model as well, such as population exponents. However, adding them to the model did not improve performance much, while their values appeared to be pretty close to 1, so we limit our analysis with having just the distance exponent making the highest impact and revealing the strongest pattern.
In Table 1 we report values obtained while fitting parameter α, i.e. the exponent for the impact of the distance between origin and destination countries. Those values indicate how fast the flux of people moving between two countries decays with an increment of the distance between them. As one can see from the table, there is a pattern that happens to be pretty distinctive for different layers of the network. And it looks quite consistent for both classical and locally normalized versions of the model: the exponent is slightly higher for Flickr network compared to Twitter and much higher for the migration layer. The higher the exponent is, the faster the decay of mobility with the distance is. We thus can conclude that migrations are usually much more dependent on distance, while short-term mobility is much less spatially constrained.

Detecting communities in the three-layer mobility network
After exploring properties of each network (layer) separately and discovering certain general similarities as well as some noticeable differences between the layers, we wanted to check our hypothesis that the three-layer mobility network can reveal qualitative patterns that cannot be observed by looking at only layer by layer. In order to evaluate the hypothesis, we focus on such a key pattern, one can discover by means of the mobility networks, as the community structure of the human society. We aim to show that combining a long-term mobility, such as migration, with short-term travels, captured by social media data, into a network with multi-layered structure can reveal important spatial patterns that might not be described by studying any single aspect of the human mobility alone. Previous studies (Ratti et al. 2010, Sobolevsky et al. 2013 have shown that community detection in human interaction and mobility networks usually leads to connected spatially cohesive communities (even with no spatial considerations in the community detection method) often revealing meaningful geographical patterns. This was no exception for the global mobility networks estimated from Twitter (Hawelka et al. 2014), as well as from migration data (Fagiolo and Mastrorillo 2013). However, while separate layers of mobility network provide interesting partial insights on the spatial structure of the global human society, we wonder if certain patterns can be seen only from the multi-layered perspective. Several ways to detect communities in multi-layer networks were proposed recently (Mucha et al. 2010, Tang et al. 2012) and for our study we chose the approach based on a direct multi-layer generalization of the most widely used objective function for network partitioning which is modularity (Newman andGirvan 2004, Newman 2006).
Even before building a multi-layer generalization of the modularity, one more adjustment has to be made to it in order to account for the absence of the loop edges in the mobility networks we consider. For that purpose, we altered the way null model used by modularity estimates the weight of each edge. In its classical form, modularity uses s i t j m as an expected weight of the edge from an origin node i to a destination node j, where s i and t j are in-and out-strengths of the nodes i and j, respectively, and m is the total weight of all edges, i.e. s i ¼ P j w ij , t j ¼ while w ij is the observed weight of the link from i to j. One of the possible explanations of such expected value s i t j m ¼ is that in random network that would preserve nodes' degrees or strengths, distribution of the outgoing strengths s i among all the possible destinations is proportional to these destinations' incoming strengths t j . Another one (as it is also is that distribution of the incoming strength t j among all the possible origins is proportional to these origins' outgoing strengths s i . However, if loop edges do not participate in this distribution, then it should be rather Since it has already been shown that modularity suffers from certain drawbacks, such as a resolution limit (Fortunato andBarthélémy 2007, Good et al. 2010) preventing it from recognizing smaller communities, we also used the approach proposed by Arenas et al. (2008) that involves introduction of the so-called resolution parameter, leading to further adjustment of the modularity score. This way the final formula for the adjusted modularity measure used for our case of the mobility networks free of the loop edges is: where a denotes the resolution parameter, i, j are nodes, C i ; C jthe communities they belong to, δðx; yÞ ¼ 1 if x ¼ y, 0 otherwise. To deal with the multi-layer network, where all layers share the same nodes, we followed the approach proposed by Tang et al. (2012). We combined adjusted modularity scores of each layer, taking their average value, and used this as a resulting utility function for the multi-layer network as follows: where l denotes layer, w l ij is the weight of the link from i to j in layer l, s l i ¼ Worth mentioning is that being defined as a normalized metric, modularity allows to focus on the qualitative structural properties of the network, largely addressing potential heterogeneity of the coverage of the data used to represent human mobility. This is done by evaluating each network edge versus the null model expectation, taking into account actual activity levels of the origins and destinations.
In order to find the best partition, we optimized this multi-layered version of modularity using efficient and precise Combo algorithm (Sobolevsky et al. 2014a), suitable for dealing with different types of objective functions. For the sake of noise reduction, we excluded nodes for which incoming or outgoing strength was less than 10 at least in one layer, that left us with a network of 201 countries and territories. We consider partition of each of the three network layers separately and of the entire three-layer mobility network with different values of resolution parameter. Figure 7 shows dependence of the resulting number of communities (provided by the algorithm looking for the optimal partition in terms of the adjusted modularity for any number of communities) on a value of the resolution parameter. As it can be seen from the figure, for the range of values of resolution parameter between 0.5 and 5.0, the number of obtained communities varies from 1, meaning that the whole network is represented as one community, to more than 60-70 for some of the networks, when most of communities consist of 1-3 countries and further analysis becomes pointless (in the Supplementary Information we present extended plots for resolution parameter values in the range from 0.5 to 10.0 showing that further outcomes are not affected in principle by broadening the range).
In order to provide the evidence for our hypothesis, we wanted to quantitatively evaluate obtained partitions. For that purpose, we compare them with the partitions obtained from other types of international connections. We quantify the similarity between partitions using the normalized mutual information (NMI) (Ana andJain 2003, Danon et al. 2005), a similarity measure which came from information theory and now is widely used in community detection for comparison of partitions. After expansion of all expressions for entropy in its definition, NMI of two partitions A and B can be calculated as: where C A and C B are the numbers of communities in each partition, N A i and N B j are the cardinalities of each community, N ij are the numbers of nodes classified to community i in partition A and to community j in partition B and N denotes the total number of nodes. NMI takes values from 0 to 1 and the higher its value is, the more similar the partitions are, meaning that for identical partitions NMI equals 1.
As it was previously described in Section 2, we chose language, colonial and trade networks as representatives of non-mobility types of international connections. We should mention though that data for constructing the language and colony networks were obtained from the results of other studies and might not represent an ultimate ground truth. Since the nature of these networks is quite different compared to the mobility networks, a direct quantitative link-by-link comparison would not make sense. Instead, we focused on the comparable patterns one can actually discover from different types of networks, such as community structure. We compared partitions of each layer and the entire multi-layer network with partitions of three other networks for the corresponding values of the resolutions parameter, controlling the overall scale of the partition in each case. We quantified similarity of partitions and took average NMI to evaluate how consistent the partitions of each layer and the entire multi-layer network are with the patterns from cultural, historical and economic networks. Results of this comparison are presented in Figure 8. They show that the community structure of the three-layer mobility network is consistently more similar to the community structure of cultural, historical and economic networks than community structure of each layer considered separately. This can serve as a good initial quantitative validation of our hypothesis: when considering different aspects of mobility together in a form of the multi-layer mobility network, one can indeed reveal some patterns more consistent with other observations than patterns discovered by considering any of mobility layers alone. In Figures 9-11, we present the results of partitioning with resolution parameter values 1.0, 1.5 and 2.0, respectively, as this is the range where it is possible to visually recognize and makes sense to analyze different communities on a map. Namely, when applying modularity maximization with the default resolution parameter of 1.0 to each layer separately, it leaves us with only 4 and 5 communities for Twitter and Flickr, respectively, while for resolution parameter equal to 2.0, number of detected communities goes up to 17 making it already harder to visually identify and interpret different colors.
From all the figures, we can see that partitions of multi-layer network seem to have less anomalies and are easier to explain than partitions of any layer alone. For example, in the Flickr and migration layers China often appears to be united with North America or even with Canada alone, which is an interesting pattern to analyze and explain. However, the multi-layer network partition based on all the mobility patterns related to the country leaves it as a part of community of Asian countries, which agrees with its overall geopolitical context. In partitions of multi-layer network, one can always clearly see communities of both Americas (for a ¼ 1 they united into one community), communities of former USSR countries and Arab countries. In case of a ¼ 1 entire Europe is nicely united into one community. And while particular patterns revealed by specific datasets are important to consider as they might point out interesting and sometimes unexpected links, when it comes to an overall regional delineation, the whole variety of such links should be considered. Partitions start to be more complicated for higher values of a, but this is because more local patterns are discovered. Nevertheless, in multi-layer network Australia is never united with the United Kingdom, Southeast Asia is always united with the rest of East Asia, south and central Africa form their own communities and China forms community around itself and not united with North American countries, i.e. communities are much more geographically cohesive. Moreover, another interesting property of the mobility networks consistent with the  previous findings of Hawelka et al. (2014) and Fagiolo and Mastrorillo (2013) is that their partitions are spatially connected even though it is never implied by the method of partitioning. And this property is particularly clearly observed for the multi-layer network partitions. We do acknowledge that some patterns in community structure of different layers may make sense and could be explained by the processes going on in the world, as different aspects of mobility provide different views. Moreover, patterns observed in long-term movements could differ from those in short-term. Nevertheless, in this research we emphasize that if one wants to study global mobility links between the countries in all their variety (as there are at least two if not more substantially different mobility types), she/he should look at various sources of data (and there are increasingly many such sources being provided by digital media). For example, studying migration patterns might not require looking into business trips as well as delineating touristic regions could be done without taking into account migrations, but for the purpose of inferring geopolitical regions it could be important to consider all the aspects of mobility. Considering just one source that can have its own biases might not be able to uncover general patterns of such a complex system. Alternatively, incorporating various sources can help to account for different factors in reconstructing a general picture of human mobility.

Conclusions
In this study, we explored records of different types of human mobility: long-term and short-term. We analyzed their similarities and differences and showed that country attractiveness, which is represented with the number of foreign people visiting it, in all three networks follows a log-normal distribution. Moreover, our results showed that normalized weights of links also follow the same distribution with almost the same scaling parameters for Flickr and Twitter networks and much more diverse for the migration one. The existence of a small number of stronger migration flows covering majority of the entire migration activity denotes that people tend to move to rather few major countries of interest, while from touristic or other short-term perspective the choices of destinations is much broader.
We ranked all countries according to their attractiveness for long-term and short-term visits and specifically investigated outlying countries that are highly ranked from one perspective and not from the other. These countries fall into two easily distinguished groups: the first one mostly consists of Arab countries that could be seen as very attractive for immigrants (wealthy, oil-rich countries with a demand for foreign labor), but not that much for tourists; and the second one is composed of developing countries with diverse and exotic nature and quite high population density which attract a lot of tourists, but fewer migrants. Nevertheless, there is also a group of highly developed countries that attract both tourists and immigrants.
We also looked at how different types of mobility could be predicted by existing models. After fitting the gravity model to all layers of our multi-layer mobility network, we showed that long-term mobility is much more constrained by distance than shortterm one. This means that when people choose where to live they take into an account distance much more often than when choosing where to go for a trip.
Finally, as we found that different datasets provide different perspectives on human mobility, we combined them into one three-layer mobility network. We showed that considering all three mobility networks together as one single multilayer network helps us to better describe the structure of the global human society in a way which is more consistent with other types of known links between the countries. Namely, we applied a community detection method to the multi-layer network and to each layer separately and compared all four resulting partitions with those obtained from networks of other existing international connections (i.e. language similarity, colonial relations and international trade). The results showed that the three-layer mobility network provides an underlying structure consistently more similar to the structures behind those international connection networks, compared to each layer taken separately. We also discuss the specific spatial patterns revealed. Therefore, our general conclusion is that considering human mobility network from a multi-layer perspective is crucial as multi-layer mobility networks can reveal some important patterns which single networks cannot.