Services that use GPS data are now deeply rooted in our daily lives (e.g., car navigation systems and location-based smartphone games). A large amount of high-frequency data collected from GPS services are used for studies without infringing on people’s privacy1,2,3,4,5,6,7,8. Over the past decade, scientific research on human mobility using high-frequency location data can be categorized roughly into two categories: macroscopic analysis of human migration between cities typically based on gravity-like laws9,10,11,12,13, and microscopic modeling of individual movement patterns based on the origin-destination matrix14,15,16,17,18,19.

The third category of mesoscopic studies appeared recently, focusing on the collective flow of people in metropolitan areas. The human flux toward the city center during the morning rush hour was analyzed to estimate macroscopic driving force potentials20. Furthermore, drainage basin structures defined from the analogy of water flow of rivers are found to have scale-free properties21,22.

Herein, we analyze mesoscopic human mobility in urban areas based on a novel analogy of electric circuits, in which collective human movements are approximated by electric currents of an imaginary lattice network of registers defined over an entire urban area. The values of the estimated conductance reflect the infrastructure of transportation (e.g., railways), and the electric potentials are determined as the driving force of the mean human flux at each time interval.

In the last part of this paper, we focus on the fluctuation around the mean flow caused by the electric potentials. For materials at thermal equilibrium, it is well known that the fluctuation width is determined by the strength of dissipation or resistivity, known as the fluctuation-dissipation relation23. Recently, the applicability of this relation has been extended to nonmaterial fields (e.g., financial markets), based on the analogy to colloidal Brownian motion in fluid molecules24,25. The motion of market price is described by the Langevin equation and the fluctuation-dissipation relation holds by analyzing high-quality market data of buy and sell orders, which correspond to molecules surrounding an imaginary colloidal particle. In this analogy, a colloidal particle corresponds to the market price. We will confirm the validity of the fluctuation-dissipation relation of our imaginary electric circuit model that describes the human flux in urban areas.


GPS data

The GPS data were provided by a Japanese company, Agoop26, containing the location of smartphones of approximately a quarter of million users in Japan throughout 2015. The data (i.e., user ID, time, coordinates, and velocity) were recorded at approximately 30 min intervals from morning to midnight. To protect privacy, no data were recorded from midnight to morning, and the ID was randomized every morning. As the population of Japan is approximately 125 million, one user represents approximately 500 people. The mobile phone ownership rate of the working-age group in Japan is about 1.5 times higher than that of those over 60 years old, and there is a tendency to overestimate the behavior of workers27. In principle, users under the age of 13 are not allowed to use the Agoop’s mobile phone applications. Also, since it is obtained from Japanese application users, foreign tourists are not included in the data.

Definition of current

To make the analogy to electric circuits, we pay attention to moving people with nonzero velocity and regard them as positively charged particles; they are assumed to be driven by an electric field. Those people with zero velocity are treated as chargeless, thus the source and sink for the charge are established. For example, in the morning, residential and business areas act as sources and sinks, respectively.

We divide the map into a grid of 500 \(\times \) 500 m squares and calculate the population density of the moving people \(\overline{\rho }_{i,j,k}\) in the cell and their mean velocity \(\overline{\varvec{v}}_{i,j,k}\) every 30 min from 5:00 to 24:00; (ij) denote the coordinates (longitude and latitude) on the map, and k denotes the time interval of 30 min (see Fig. 1a-left, a-middle left)21. The resolution of the 500 m square is selected to be as small as possible taking into account the GPS error(up to 100 m) and the error caused by the number of users in each square. Based on the resolution of our GPS data, we set a human flow snapshot every 30 min. In this process, we averaged over all weekdays of 2015 to obtain enough data points in each cell for each 30 min. The longitudinal electric current from cell (ij) to the neighbor cell \((i+1, j)\) at time interval k is given by the following equation:

$$\begin{aligned} \varvec{I}_{(i,j)\rightarrow (i+1,j),k}=\frac{\overline{v}_{x,i,j,k}\overline{\rho }_{i,j,k}+\overline{v}_{x,i+1,j,k}\overline{\rho }_{i+1,j,k}}{2}, \end{aligned}$$

where \(\overline{v}_{x,i,j,k}\) is the longitudinal component of the velocity vector \(\overline{\varvec{v}}_{i,j,k}\) measured by km/h; likewise for the latitudinal component. These currents are defined as dark rectangles in Fig. 1a-middle right; resistance is defined later. The proposed electric circuit model is illustrated in Fig. 1a-right. Red dot represents the center of a cell where the electric potential and the quantity of the sink and source of charges are defined. Yellow dots represent the corners of four cells where rotation of the electric field is introduced.

Figure 1b–d show examples of current strength maps around the center of Tokyo in a typical morning (7:30–8:00), afternoon (13:30–14:00), and evening (18:30–19:00), which are typical time intervals for the morning, afternoon, and evening hours according to the time variation of the number of the rail user28. The color depth indicates the strength of current. Figure 1b shows a typical current pattern of morning rush hour where strong currents are observed along railroads and highways directing toward the city center. Figure 1c shows a typical afternoon current pattern where red indicates a current direction opposite to the morning pattern in Fig. 1b. The overall strength of currents is weaker and about half of the directions differ from morning. The evening pattern Fig. 1d are mostly in red, showing that the current directions are mostly opposite to the morning pattern.

Figure 1
figure 1

Definition of the imaginary electric circuit and observed currents. (a) Schematic figures demonstrating the way we regard the human flow as electric current. The mean velocity of people in each cell is calculated by evaluating their average velocity components over those people who are moving in the square during the observation interval of 30 min. The current and resistance were defined between adjacent cells. Rotation is defined at the orange dots where the four cells meet, and the potential is defined at the red dots in the center of the cell. (bd) Current patterns on the map in the morning, afternoon, and evening. The red lines show the currents with different direction compared to the morning current pattern. The strength of the flow was plotted on a logarithmic scale. The gray lines in the map represent the railways.

Estimation of resistance

The next step is to determine the values of resistance of our model based on the idea that the rotation of the electric field at each corner of the four cells, defined by the following equation, should be approximately zero.

$$\begin{aligned} \nabla \times (\varvec{I}R)_{i+0.5,j+0.5,k}= & {} \frac{(\varvec{I}R)_{(i+1,j)\rightarrow (i+1,j+1),k}-(\varvec{I}R)_{(i,j)\rightarrow (i,j+1),k}}{\Delta x} \nonumber \\&-\frac{(\varvec{I}R)_{(i,j+1)\rightarrow (i+1,j+1),k}-\varvec{(I}R)_{(i,j)\rightarrow (i+1,j),k}}{\Delta y}, \end{aligned}$$

where \(R_{(i,j)\rightarrow (i+1,j)}\) is the resistance from cell (ij) to the neighbor cell \((i+1, j)\). We assume that the resistance values reflect the infrastructure of cities and do not depend on time. The cell sizes in both directions are regarded as unity (i.e., \(\Delta x=\Delta y=1\)).The values of resistance are determined iteratively using Adam29—a type of steepest descent method to minimize the sum of the square of rotation for all locations at all times with the restriction that each resistance is positive while conserving the total sum of resistance, i.e.:

$$\begin{aligned}&{\mathrm{minimize}} \quad L=\sum _{i,j,k} (\nabla \times (\varvec{I}R^{\tau })_{i+0.5,j+0.5,k})^{2} \nonumber \\&\text{subject to} \quad R_{(i,j),(i',j')}>0 \nonumber \\&\sum R_{(i,j),(i',j')}^{0}=\sum R_{(i,j),(i',j')}^{\tau } \,\,\,\,(R_{(i,j),(i',j')}^{0}=1), \end{aligned}$$

where \(R^{\tau }\) denotes the resistance at the \(\tau \)-th iteration that starts with a uniform initial condition \(R^0=1\). The number of resistors in this circuit model for urban areas of Tokyo is approximately 75000, and the resistance values of the resistors on the boundary of the model were fixed as infinity so that no flux enters through the boundary.

Figure 2a shows the spatial configuration of rotation for a morning rush hour at the initial iteration \(\tau =0\) (i.e., the case of uniform resistance). We find that high rotation values of opposite signs are located along the railways, which are caused by large currents. By the above optimization process, the resistance near high current parts was reduced to decrease the appearance of rotation pairs with opposite signs. As shown in Fig. 2b the sum of squares of rotation decreases quickly to less than 1 / 1000 after approximately 5000 iterations, thus the values of resistance converge. Figure 2c shows the relationship between the maximum current at each cell for a day and the estimated conductance. Conductance, \(G=1/R\), is proportional to the maximum current at each cell, which can be thought to represent the capacity of railroads and highways. Figure 2d shows the spatial configuration of estimated conductance values for the same area as Fig. 2a. We confirmed that the conductance values are high along the railways and highways.

Figure 2
figure 2

Optimization process and estimated conductance around Tokyo metropolitan area. (a) Rotation patterns on the map in the morning. (b) Step-by-step decrease in the sum of squares of rotation calculated in the Tokyo metropolitan area. (c) Relationship between the maximum current at each cell for a day and the estimated conductance with a scaling exponent of 1.0. (d) Volume map of conductance in the Tokyo metropolitan area drawn on a logarithmic scale.

Electric potential

As shown, a nearly rotation-free electric field \(\varvec{I}R\) is achieved by optimizing conductance. We calculate the electric potential by solving Poisson’s equation. The discretized Poisson’s equation of the electric network is given as:

$$\begin{aligned}{}[\nabla \cdot {\varvec{I}R}]_{i,j,k}=\, & {} Q_{i,j,k} \nonumber \\ \varvec{I}_{(i,j)\rightarrow (i+1,j),k} R_{(i,j),(i+1,j)}=\, & {} \phi _{i,j,k}-\phi _{i+1,j,k}, \end{aligned}$$

where \(Q_{i,j,k}\) denotes the sink or source of charges in cell (ij) at time interval k, and \(\phi _{i,j,k}\) is the electric potential of the said cell. The value of the electric potential on the boundary of the model was set to 0 (see Supplementary for boundary condition influence). For a given \(Q_{i,j,k}\), the value of \(\phi _{i,j,k}\) is uniquely determined by solving the linear equation (4). The morning and evening estimated potentials around the Tokyo metropolitan area are valley- and mountain-shaped, respectively, centered in central Tokyo (see Fig. 3a,c). These results are consistent with human flow patterns in commuting and returning rush characterized by directed drainage basins21. In contrast, the potential in the afternoon (see Fig. 3b) is nearly flat, which is consistent with the result that daytime flow patterns are approximately random21.

Figure 3
figure 3

Temporal changes of electric potential (a) Morning, (b) Afternoon, (c) Evening. Blue and red represent valley-like and mountain-like shapes, respectively.

Fluctuation of current

Next, we focus on the number of moving people who contributed to the electric field. Figure 4a shows the time evolution of the moving people to userbase ratio. In the morning peak hour, about 15% of people are moving while about 8% are moving in the afternoon and about 13% in the evening rush hour.

At the end of this study, we focus on fluctuations around the mean currents. Figure 4b represents the mean currents and the standard deviation of daily fluctuation of currents for each time interval observed at a resistor located between the residential area and the city center along a major railway. Figure 4c shows the daily values of currents during weekdays for the said resistor at three time intervals: morning rush hour, afternoon, and evening rush hour. We find large fluctuations in all cases, which is consistent with Fig. 4b, because the standard deviations are nearly constant for all time intervals. Figure 4d is a log-log plot of the variance of current fluctuations conditioned by the conductance value G for all resistors for all time intervals. We find a linear relation between the variance of currents and the conductance, which is a familiar relation known as the fluctuation-dissipation relation for resistors in thermal equilibrium with no mean current23. However, our imaginary electric circuit model is far from thermal equilibrium. This relation may hold because there are about 8% of people who move nearly randomly, as typically seen in the afternoon, which may mainly contribute to the fluctuation-dissipation relation. These results were also confirmed for two other urban areas, Osaka and Nagoya (see Supplementary).

Figure 4
figure 4

The relations between the variance of current and estimated conductance around Tokyo metropolitan area. (a) Ratio of moving people in the Tokyo metropolitan area by time of day. (b) Example of average current change in a cell during the day. Error bars represent standard deviation. (c) Weekday currents in the morning (blue), afternoon (green), and evening (red) of the cells noted in (b) are plotted daily. (d) Relationship between the variance of the current in each cell and the conductance with scaling exponent 1.0.


In summary, we established a basic framework for mapping human flow observed by GPS data in urban areas to an imaginary electric circuit network reflecting the transportation infrastructure. We confirmed that the results are almost the same even with the two-times larger resolution of 1 h and in other Japanese cities such as Osaka and Nagoya (see Supplementary). The model assumes no rotations of the electric field, and this assumption allows the human flow to be treated as a potential field. The currents represent the mean human flow, and the gradient of the potential field is considered to represent the transportation demand at each location. The conductance values are roughly proportional to the maximum current and can be interpreted as reflecting the capacity of transportation at each location, and indeed the locations with high conductance values are consistent with railroads and highways. This predicts that if the number of trains on a given rail line is cut in half, the conductance may also be cut in half. Also, we calculated the fluctuations, because a current can be almost canceled out by the opposite movements of the individuals. Fluctuations around the mean value of synchronized human flow are analogous to fluctuations in thermal equilibrium in materials. It is surprising that the properties of materials in a random thermal equilibrium state can be applied to humans as well, even though each person moves with a purpose. It is almost impossible to observe the motions of individual charged particles in a material, but we can follow a huge number of detailed trajectories of an individual by GPS data.

Our model may provide the platform for numerical simulation of the human flow in metropolitan areas considering both synchronized potential flow and random fluctuations. By changing the values of the resistance network, it may be possible to simulate a case of accident that suddenly stops public transport of an area and people find detour routes to reach their destination. We plan to observe the change of current when the resistance network is varied under the assumption that the quantities of sink and source are kept invariant for short-term traffic failure, and compare this with actual traffic accidents. The impact of COVID-19 is also currently being analyzed. By analyzing the GPS data from January 2020, we expect to observe the changes of potentials quantitatively comparing with the spread of COVID-19.

We believe that our method can be applied widely to most metropolitan areas if similar GPS data is available. We know that some GPS data does not contain the velocity information needed to estimate the currents in our formulation. In such a case, estimating the currents from the given GPS data is required, which is not difficult if the observation intervals are short enough.