Being able to infer the number of people in a specific area is of extreme importance for the avoidance of crowd disasters and to facilitate emergency evacuations. Here, using a football stadium and an airport as case studies, we present evidence of a strong relationship between the number of people in restricted areas and activity recorded by mobile phone providers and the online service Twitter. Our findings suggest that data generated through our interactions with mobile phone networks and the Internet may allow us to gain valuable measurements of the current state of society.
The ability to quickly and accurately estimate the size of a crowd is crucial in facilitating emergency evacuations and avoiding crowd disasters . However, existing approaches which rely on human analysts counting samples of the crowd can be time-consuming or costly . Similarly, image-processing solutions require image data to be available in which members of the crowd can be identified and counted by an algorithm [3,4]. Recent studies have provided evidence that data generated through interactions with the Internet [5–20], mobile phone networks [21–25] and other large technological systems can offer new insights into human behaviour [26–31]. Here, we investigate whether data on mobile phone usage and usage of the online social media service Twitter can be used to estimate the number of people in a specific area at a given time. We consider data resulting from ordinary use of smartphones, without the need for users to install specific applications on their mobile phone.
We retrieve data on mobile phone and Twitter activity recorded in the city of Milan and surroundings in a period covering two months from 1 November 2013 to 31 December 2013 . Both datasets describe activity in the geographical area depicted in figure 1a. The Twitter dataset consists of all messages sent via Twitter (‘tweets’), with associated geographical coordinates located within the area shown in figure 1a. Tweets are also timestamped. Initial visual inspection of the Twitter data shows that greater numbers of tweets are recorded in the centre of Milan, where we would expect greater numbers of people to be found (figure 1b).
The mobile phone activity dataset describes the volume of calls made and received, SMSs sent and received and Internet connections opened, closed and maintained. Mobile phone activity measurements are provided at 10 min granularity, for cells in a discrete grid superimposed on the area of Milan. This grid has 10 000 cells of size 235×235 . Further details of this dataset are provided in the electronic supplementary material. Visual inspection of the distribution of call and SMS activity (figure 1c) and Internet connection activity (figure 1d) again confirms mobile phone activity is highest in the city centre of Milan.
We investigate whether the information present in these datasets can be used to infer the number of people in specific areas of Milan at a given time. To calibrate our model, we consider two case studies of access restricted areas for which relevant data exist: San Siro football stadium, for which we have attendance counts for 10 football matches which took place during the period of analysis, and Linate Airport, for which we use flight schedule data to create a proxy indicator for the number of people present in the airport at any given time.
We examine the time series of call and SMS activity (figure 2a), Internet activity (figure 2b) and Twitter activity (figure 2c) recorded in the vicinity of the football stadium Stadio San Siro during the period of analysis between 1 November 2013 and 31 December 2013. The coordinates of the area for which data were analysed are given in the electronic supplementary material, tables S3 and S4. In all three time series, we observe 10 distinct spikes, which occur at the same times across all time series. We find that the dates on which these spikes occur coincide exactly with the dates on which the 10 football matches took place in the stadium during this period (figure 2d). Furthermore, we note that the relative sizes of the spikes in the mobile phone and Twitter activity time series (figure 2a–c) bear a strong similarity to the relative sizes of the attendance counts for these matches, as depicted in figure 2d.
We extract the maximum values of the spikes in calls and SMS activity, Internet activity and Twitter activity. We observe a linear relationship between the number of people attending the football matches and the volume of incoming and outgoing phone calls and SMS messages (adjusted R2=0.771, N=10, p<0.001, ordinary least-squares regression; figure 3a). We find similar relationships between the number of attendees and both Internet activity (R2=0.937, N=10, p<0.001, ordinary least-squares regression; figure 3b) and Twitter activity (R2=0.855, N=10, p<0.001, ordinary least-squares regression; figure 3c). While figure 3a–c suggest a strongly linear relationship between mobile phone activity data and the number of attendees, we note that this relationship holds in a non-parametric analysis too (calls and SMS activity: Spearman's ρ=0.927, N=10, p<0.001; Internet activity: Spearman's ρ=0.976, N=10, p<0.001; Twitter activity: Spearman's ρ=0.924, N=10, p<0.001).
We investigate the possibility of using the information present in communication data to infer the number of attendees in situations where no other measurements are easily accessible. As an example, we consider data on Internet activity, for which the relationship with the number of recorded attendees was strongest. We carry out a leave-one-out cross-validation analysis as follows: for each of the 10 attendance figures, we build a linear regression model based on the remaining nine attendance figures and the corresponding Internet activity data. We then use this model to generate an estimate of the attendance figure which was removed from the recorded Internet activity data. In figure 3d, we plot the resulting estimates and their 95% prediction intervals. We find that the actual attendance figure is always within the 95% prediction interval of our estimate.
We note that our analysis of mobile phone activity data may be affected by capacity constraints, such as signal truncation, on mobile phone communication in the stadium. Should data on such constraints become available in the future, the influence of these constraints on the relationship between communication data and crowd size may merit further analysis.
We perform a parallel analysis of the relationship between mobile phone and Twitter data and the number of passengers at Linate Airport. To estimate the number of people in Linate Airport at any given hour during the analysis period, we assume that passengers may arrive at the airport up to 2 h before a departing flight, and depart within an hour following a flight arrival. For each hour, we therefore calculate the number of flights departing in the following 2 h or arriving in the previous hour, and use this as a proxy indicator for the number of passengers in the airport. We base our calculations on one week of flight schedule data from May 2014, as explained in the electronic supplementary material, and assume that weekly flight schedules are relatively constant. Our proxy indicator is therefore calculated for each of the 168 hours in a week. We omit the three initial days and two final days of the analysis period to create a period of exactly eight weeks.
We compare this proxy indicator to the average mobile phone call and SMS activity and to the average Internet activity recorded for each hour in a week, in the cells in which the airport is located, as detailed in the electronic supplementary material, table S5. We find that greater phone call and SMS activity corresponds to a greater estimated number of passengers (adjusted R2=0.175, N=168, p<0.001, ordinary least-squares regression; figure 4a). Similarly, we find that greater Internet activity relates to a higher estimated number of passengers (adjusted R2=0.143, N=168, p<0.001, ordinary least-squares regression; figure 4b). The relationships we find are weaker than those found in the previous case study, but remarkable given the coarse nature of our estimate of the number of passengers.
We analyse Twitter activity in the area of the airport detailed in the electronic supplementary material, table S6. In this case, we observe a stronger relationship between the estimated number of passengers and activity on Twitter (adjusted R2=0.510, N=168, p<0.001, ordinary least-squares regression; figure 4c). We observe that mobile phone, SMS and Internet activity is still recorded when no flights take place, generally during night-time periods. By contrast, few tweets are logged at these times, potentially explaining the greater strength of this relationship.
We note that roughly 58% of the passengers travelling to and from Linate Airport are Italian . Given the current costs of using mobile phone networks abroad, the mobile phone activity analysed here may reflect the behaviour of Italian passengers more strongly than the behaviour of international passengers.
Our results provide evidence that accurate estimates of the number of people in a given location at a given time can be extrapolated from mobile phone or Twitter data, without requiring users to install further applications on their smartphones. As well as being of clear practical value for a range of business and policy stakeholders, our findings suggest that data generated through our interactions with mobile phone networks and the Internet may allow us to gain valuable measurements of the current state of society.
Datasets used in this study are available via the Dryad Repository (doi:10.5061/dryad.1rk60).
F.B., H.S.M. and T.P. performed analyses, discussed the results and contributed to the text of the manuscript.
We declare we have no competing interests.
F.B. acknowledges the support of UK EPSRC EP/E501311/1. H.S.M. and T.P. acknowledge the support of the Research Councils UK grant EP/K039830/1.
- Received April 21, 2015.
- Accepted May 1, 2015.
© 2015 The Authors. Published by the Royal Society under the terms of the Creative Commons Attribution License http://creativecommons.org/licenses/by/4.0/, which permits unrestricted use, provided the original author and source are credited.