1 Main text

Technological improvement and economic development promote the rapid growth of transportation systems globally and nationwide. In particular, over the past decades, the transportation systems in mainland China have gained remarkable achievements and the main transportation methods (aviation, railway, highway and shipping) form a rapidly expanding multiplex network. Since the Reform and Opening-up of China, it became a common sense for Chinese people that, “To be rich, build roads.” The total length of highways was about 0.0808 million kilometers in early 1950s and 0.890 million kilometers by the end of 1978. The construction of the first expressway started on 21 December 1984. The total highway length reached 4.85 million kilometers by the end of 2018 and the highway system contains national highways, provincial highways, county highways and countryside highways. The network includes 0.143 million kilometers expressways, making China the longest expressway network in the world.

The gravity law has been documented in many socioeconomic networks, in which locations (such as countries, regions and cities) are nodes and flows (such as products, migrants, and travelers) are edge weights. It states that the flow between two nodes positively correlates with the strengths of the nodes and negatively correlates with the distance between the two nodes. Inspired by Newton’s law of gravity in physical sciences, gravity has been observed in human migration and mobility behavior [1,2,3,4,5,6,7], international trade flows [8,9,10,11,12,13,14,15,16,17], mobile phone communication flows [18,19,20,21,22,23], and so on. Some of these studies investigated the power-law decay of the flow with respect to the distance, while most others considered also node strengths.

As far as highway network is concerned, Jung, Wang and Stanley investigated the Korean highway network between the 30 largest cities [24]. They found that the traffic between two cities is positively proportional to the populations and negatively proportional to the distance, fitting exactly the traditional gravity law over two orders of magnitude. Kwon and Jung investigated the express bus flow in Korea consisting of 74 cities and 170 bus routes with 6692 operating buses per day and confirmed the presence of the gravity law [25]. Hong and Jung studied the urban bus networks of Korean cities and confirmed the presence of the gravity law [26].

In this work, we investigate a huge database about the freight highway transportation by trucks between 338 cities in mainland China. Although most studies dealt with undirected transportation networks [27, 28], we also consider directed transportation networks due to the availability of data. In our analysis, we consider the traditional gravity law, as well as the modified form of the gravity law in which the power-law exponents of the variables are not necessarily fixed.

2 Data description

The database we analyze was provided by a leading truck logistics company in China. The trucks transport freights between 338 cities in mainland China. The data covers the period from 1 January 2019 to 31 May 2019 and there are totally 15.06 million truck freight transportation records. Each record contains the origin and destination cities and the starting date of the transportation.

We construct the daily flow matrix \({\mathbf{F}}(t) = [F_{ij}(t) ]_{338\times338}\) for each day t, where \(F_{ij}(t)\) stands for the number of trucks with freights departing city i for city j on day t. Running trucks that do not load freights are not counted in. The flow matrix for the whole sample is thus

$$ {\mathbf{F}} = \sum_{t}{\mathbf{F}}(t). $$
(1)

We note that \({\mathbf{F}}(t)\) and F are directed networks. When we consider the total truck flow \(W_{ij}\), we obtain an undirected network:

$$ {\mathbf{W}} = {\operatorname{triu}} \bigl({\mathbf{F}} + {\mathbf{F}}^{\mathbf{T}} \bigr), $$
(2)

where triu denotes the upper triangle matrix operator and T is the transpose operator. By definition, we have

$$ W_{ii}=F_{ii}=0. $$
(3)

In other words, intracity transportation is not included in the data.

3 The traditional gravity model

In the perspective of directed complex networks, the traditional gravity model states that the edge flow \(F_{ij}\) between two nodes i and j takes the form of

$$ F_{ij} = C {M_{i}M_{j}}/{d_{ij}^{2}} $$
(4)

for \(i\neq{j}\), where C is a constant, \(d_{ij}\) stands for the distance between i and j, and \(M_{i}\) and \(M_{j}\) stand respectively for the economic dimensions of the two nodes i and j that are being measured. For undirected transportation networks, we have

$$ W_{ij} = C {M_{i}M_{j}}/{d_{ij}^{2}} $$
(5)

for \(j>i\). In our analysis, we consider M to be GDP (G), population (P) and per capita GDP (\(G/P\)), respectively.

3.1 GDP in the traditional gravity law

3.1.1 Whole transportation networks

Figure 1(a) shows the scatter plot of \(F_{ij}\) with respect to \(G_{i}G_{j}/d_{ij}^{2}\) for the directed network. When M in Eq. (4) stands for GDP, the regression equation of the gravity law reads

$$ \lg F_{ij} = \alpha_{0}+\alpha_{1}\lg \bigl[G_{i}G_{j}/d_{ij}^{2} \bigr] + \epsilon, $$
(6)

where ϵ is the error term. We obtain that \(\alpha_{0}=1.383\pm0.004\) and \(\alpha_{1}=0.612\pm0.004\), where the adjusted \(R^{2}\) statistic is 0.476, the F statistic and p-value for the full model are respectively 85,246 and 0.000, and an estimate of the error variance is 0.352. We bin the data with respect to F and illustrate the results in Fig. 1(b). We observe that there is a power-law dependence when F is greater than about 100. A regression shows that \(\alpha_{0}=1.489\pm0.025\) and \(\alpha_{1}=0.965\pm0.017\) with their p-values being 0.0000 and 0.0000. The adjusted \(R^{2}\) statistic is 0.995 and the F statistic and p-value for the full model are respectively 3296 and 0.0000.

Figure 1
figure 1

Testing the traditional gravity law with GDP for the directed and undirected freight highway transportation networks constructed over five months. (a) Scatter plot of \(F_{ij}\) with respect to \(G_{i}G_{j}/d_{ij}^{2}\) for the directed network. (b) Binning plot of \(F_{ij}\) with respect to \(G_{i}G_{j}/d_{ij}^{2}\) for the directed network. (c) Scatter plot of \(W_{ij}\) with respect to \(G_{i}G_{j}/d_{ij}^{2}\) for the undirected network. (d) Binning plot of \(W_{ij}\) with respect to \(G_{i}G_{j}/d_{ij}^{2}\) for the undirected network

Figure 1(c) shows the scatter plot of \(W_{ij}\) with respect to \(G_{i}G_{j}/d_{ij}^{2}\) for the undirected network. When M in Eq. (5) stands for GDP, the regression equation of the gravity law reads

$$ \lg W_{ij} = \alpha_{0}+\alpha_{1}\lg \bigl[G_{i}G_{j}/d_{ij}^{2} \bigr] + \epsilon. $$
(7)

We obtain that \(\alpha_{0}=1.705\pm0.005\) and \(\alpha_{1}=0.662\pm0.005\), where the adjusted \(R^{2}\) statistic is 0.566, the F statistic and p-value for the full model are respectively 66,530 and 0.000, and an estimate of the error variance is 0.309. We bin the data with respect to W and illustrate the results in Fig. 1(d). We observe that there is a power-law dependence when W is greater than about 200. A regression shows that \(\alpha_{0}=1.917\pm0.022\) and \(\alpha_{1}=0.828\pm0.013\) with the p-values being 0.0000 and 0.0000. The adjusted \(R^{2}\) statistic is 0.996 and the F statistic and p-value for the full model are respectively 3912 and 0.0000.

We find that, for the scatter plots, the adjusted \(R^{2}\) statistic for the undirected HFTN (0.566) is greater than that for the directed HFTN (0.476). This result is visible in Fig. 1, which shows that the scatter plot is thinner for \(W_{ij}\) when compared with the one for \(F_{ij}\).

3.1.2 Daily transportation networks

We now test the gravity law with daily directed and undirected freight highway transportation networks. We find that most of the daily networks exhibit the gravity law. As an example, the results for the directed network on 15 January 2019 are illustrated in Fig. 2(a). Regression of Eq. (6) for the scatter data points gives that \(\alpha_{0}=0.196\pm0.006\) and \(\alpha _{1}=0.194\pm0.005\), where the adjusted \(R^{2}\) statistic is 0.191, the F statistic and p-value for the full model are respectively 6779 and 0.000, and an estimate of the error variance is 0.129. Regression for the binning data points shows that \(\alpha_{0}=-0.257\pm 0.130\) and \(\alpha_{1}=0.824\pm0.080\), where the adjusted \(R^{2}\) statistic is 0.947, the F statistic and p-value for the full model are respectively 449 and 0.000, and an estimate of the error variance is 0.007. The results for the undirected network on 15 January 2019 are illustrated in Fig. 2(b). Regression of Eq. (7) for the scatter data points gives that \(\alpha_{0}=0.261\pm0.007\) and \(\alpha _{1}=0.268\pm0.006\), where the adjusted \(R^{2}\) statistic is 0.281, the F statistic and p-value for the full model are respectively 8246 and 0.000, and an estimate of the error variance is 0.142. Regression for the binning data points shows that \(\alpha_{0}=-0.047\pm 0.097\) and \(\alpha_{1}=0.801\pm0.068\), where the adjusted \(R^{2}\) statistic is 0.959, the F statistic and p-value for the full model are respectively 583 and 0.000, and an estimate of the error variance is 0.006.

Figure 2
figure 2

Testing the traditional gravity law with GDP for the daily directed and undirected freight highway transportation networks. (a) The directed network on 15 January 2019. (b) The directed network on 15 January 2019. (c) The directed network on 4 February 2019. (d) The undirected network on 4 February 2019

However, we find that the daily networks around the Chinese New Year (5 February 2019) do not exhibit the gravity law. The transportation flow decreased significantly during the Spring Festival because most of the truck drivers returned home to gather with their families and most companies were also closed. As an example, the results for the directed network on 4 February 2019 are illustrated in Fig. 2(c). Regression of Eq. (6) for the scatter data points gives that \(\alpha_{0}=0.167\pm0.011\) and \(\alpha _{1}=0.014\pm0.008\), where the adjusted \(R^{2}\) statistic is 0.003, the F statistic and p-value for the full model are respectively 13 and 0.000, and an estimate of the error variance is 0.076. Regression for the binning data points shows that \(\alpha_{0}=0.585\pm1.437\) and \(\alpha_{1}=0.121\pm1.247\), where the adjusted \(R^{2}\) statistic is 0.005, the F statistic and p-value for the full model are respectively 0.047 and 0.833, and an estimate of the error variance is 0.118. The results for the undirected network on 15 January 2019 are illustrated in Fig. 2(d). Regression of Eq. (7) for the scatter data points gives that \(\alpha_{0}=0.176\pm0.012\) and \(\alpha _{1}=0.034\pm0.009\), where the adjusted \(R^{2}\) statistic is 0.014, the F statistic and p-value for the full model are respectively 62 and 0.000, and an estimate of the error variance is 0.085. Regression for the binning data points shows that \(\alpha_{0}=-0.642\pm0.934\) and \(\alpha_{1}=1.142\pm0.740\), where the adjusted \(R^{2}\) statistic is 0.485, the F statistic and p-value for the full model are respectively 11 and 0.006, and an estimate of the error variance is 0.063. All the four adjusted \(R^{2}\) statistics are close to zero, implying that the term \(G_{i}G_{j}/d_{ij}^{2}\) does not have explanatory power for the transportation flow \(F_{ij}\) or \(W_{ij}\) and the gravity law is absent.

In Fig. 3, we present the evolution of the exponents \(\alpha_{1}\) of daily directed and undirected freight highway transportation networks. In each case, the exponent fluctuates roughly around a constant. The cone peak or valley corresponds to the dates around the Spring Festival during which the gravity law does not hold.

Figure 3
figure 3

Evolution of the exponents \(\alpha_{1}\) of daily directed and undirected freight highway transportation networks. (a) Scatter data of \(F_{ij}\) with respect to \(G_{i}G_{j}/d_{ij}^{2}\) for the directed network. (b) Binning data of \(F_{ij}\) with respect to \(G_{i}G_{j}/d_{ij}^{2}\) for the directed network. (c) Scatter data of \(W_{ij}\) with respect to \(G_{i}G_{j}/d_{ij}^{2}\) for the undirected network. (d) Binning data of \(W_{ij}\) with respect to \(G_{i}G_{j}/d_{ij}^{2}\) for the undirected network

3.2 Population in the traditional gravity law

3.2.1 Whole transportation networks

Figure 4(a) shows the scatter plot of \(F_{ij}\) with respect to \(P_{i}P_{j}/d_{ij}^{2}\) for the directed network. When M in Eq. (4) stands for population, the regression equation of the gravity law reads

$$ \lg F_{ij} = \alpha_{0}+\alpha_{1}\lg \bigl[P_{i}P_{j}/d_{ij}^{2} \bigr] + \epsilon, $$
(8)

where ϵ is the error term. We obtain that \(\alpha_{0}=2.289\pm0.007\) and \(\alpha_{1}=0.660\pm0.005\), where the adjusted \(R^{2}\) statistic is 0.441, the F statistic and p-value for the full model are respectively 74,010 and 0.000, and an estimate of the error variance is 0.376. We bin the data with respect to F and illustrate the results in Fig. 4(b). We observe that there is a power-law dependence when F is greater than about 100. A regression shows that \(\alpha_{0}=2.986\pm0.012\) and \(\alpha_{1}=1.081\pm0.019\) with their p-values being 0.0000 and 0.0000. The adjusted \(R^{2}\) statistic is 0.995 and the F statistic and p-value for the full model are respectively 3316 and 0.0000.

Figure 4
figure 4

Testing the traditional gravity law with population for the directed and undirected freight highway transportation networks constructed over five months. (a) Scatter plot of \(F_{ij}\) with respect to \(P_{i}P_{j}/d_{ij}^{2}\) for the directed network. (b) Binning plot of \(F_{ij}\) with respect to \(P_{i}P_{j}/d_{ij}^{2}\) for the directed network. (c) Scatter plot of \(W_{ij}\) with respect to \(P_{i}P_{j}/d_{ij}^{2}\) for the undirected network. (d) Binning plot of \(W_{ij}\) with respect to \(P_{i}P_{j}/d_{ij}^{2}\) for the undirected network

Figure 4(c) shows the scatter plot of \(W_{ij}\) with respect to \(P_{i}P_{j}/d_{ij}^{2}\) for the undirected network. When M in Eq. (5) stands for GDP, the regression equation of the gravity law reads

$$ \lg W_{ij} = \alpha_{0}+\alpha_{1}\lg \bigl[P_{i}P_{j}/d_{ij}^{2} \bigr] + \epsilon. $$
(9)

We obtain that \(\alpha_{0}=2.683\pm0.009\) and \(\alpha_{1}=0.717\pm0.006\), where the adjusted \(R^{2}\) statistic is 0.525, the F statistic and p-value for the full model are respectively 56,394 and 0.000, and an estimate of the error variance is 0.338. We bin the data with respect to W and illustrate the results in Fig. 4(d). We observe that there is a power-law dependence when W is greater than about 200. A regression shows that \(\alpha_{0}=3.202\pm0.009\) and \(\alpha_{1}=0.919\pm0.013\) with the p-values being 0.0000 and 0.0000. The adjusted \(R^{2}\) statistic is 0.997 and the F statistic and p-value for the full model are respectively 4647 and 0.0000.

We find that, for the scatter plots, the adjusted \(R^{2}\) statistic for the undirected HFTN (0.525) is greater than that for the directed HFTN (0.441). This result is visible in Fig. 4, which shows that the scatter plot is thinner for \(W_{ij}\) when compared with the one for \(F_{ij}\).

3.2.2 Daily transportation networks

We now test the gravity law with daily directed and undirected freight highway transportation networks. We find that most of the daily networks exhibit the gravity law. As an example, the results for the directed network on 15 January 2019 are illustrated in Fig. 5(a). Regression of Eq. (8) for the scatter data points gives that \(\alpha_{0}=0.491\pm0.005\) and \(\alpha_{1}=0.206\pm0.005\), where the adjusted \(R^{2}\) statistic is 0.176, the F statistic and p-value for the full model are respectively 6128 and 0.000, and an estimate of the error variance is 0.131. Regression for the binning data points shows that \(\alpha_{0}= 1.043\pm0.040\) and \(\alpha_{1}=0.939\pm0.109\), where the adjusted \(R^{2}\) statistic is 0.927, the F statistic and p-value for the full model are respectively 317 and 0.000, and an estimate of the error variance is 0.010. The results for the undirected network on 15 January 2019 are illustrated in Fig. 5(b). Regression of Eq. (9) for the scatter data points gives that \(\alpha_{0}=0.663\pm0.007\) and \(\alpha_{1}=0.283\pm0.007\), where the adjusted \(R^{2}\) statistic is 0.256, the F statistic and p-value for the full model are respectively 7253 and 0.000, and an estimate of the error variance is 0.147. Regression for the binning data points shows that \(\alpha_{0}=1.203\pm0.038\) and \(\alpha_{1}=0.896\pm0.087\), where the adjusted \(R^{2}\) statistic is 0.947, the F statistic and p-value for the full model are respectively 448 and 0.000, and an estimate of the error variance is 0.007.

Figure 5
figure 5

Testing the traditional gravity law with population for the daily directed and undirected freight highway transportation networks. (a) The directed network on 15 January 2019. (b) The directed network on 15 January 2019. (c) The directed network on 4 February 2019. (d) The undirected network on 4 February 2019

However, we find that the daily networks around the Chinese New Year (5 February 2019) do not exhibit the gravity law. The transportation flow decreased significantly during the Spring Festival because most of the truck drivers returned home to gather with their families and most companies were also closed. As an example, the results for the directed network on 4 February 2019 are illustrated in Fig. 5(c). Regression of Eq. (8) for the scatter data points gives that \(\alpha_{0}=0.182\pm0.009\) and \(\alpha_{1}=0.001\pm0.008\), where the adjusted \(R^{2}\) statistic is 0.000, the F statistic and p-value for the full model are respectively 0.072 and 0.789, and an estimate of the error variance is 0.076. Regression for the binning data points shows that \(\alpha_{0}=0.531\pm0.645\) and \(\alpha_{1}=-0.386\pm1.222\), where the adjusted \(R^{2}\) statistic is 0.047, the F statistic and p-value for the full model are respectively 0.496 and 0.497, and an estimate of the error variance is 0.113. The results for the undirected network on 15 January 2019 are illustrated in Fig. 5(d). Regression of Eq. (9) for the scatter data points gives that \(\alpha_{0}=0.222\pm0.010\) and \(\alpha_{1}=0.022\pm0.010\), where the adjusted \(R^{2}\) statistic is 0.005, the F statistic and p-value for the full model are respectively 20.5 and 0.000, and an estimate of the error variance is 0.086. Regression for the binning data points shows that \(\alpha_{0}=1.251\pm0.540\) and \(\alpha_{1}=1.171\pm1.271\), where the adjusted \(R^{2}\) statistic is 0.251, the F statistic and p-value for the full model are respectively 4.03 and 0.068, and an estimate of the error variance is 0.092. All the four adjusted \(R^{2}\) statistics are close to zero, implying that the term \(P_{i}P_{j}/d_{ij}^{2}\) does not have explanatory power for the transportation flow \(F_{ij}\) or \(W_{ij}\) and the gravity law is absent.

In Fig. 6, we present the evolution of the exponents \(\alpha_{1}\) of daily directed and undirected freight highway transportation networks. In each case, the exponent fluctuates roughly around a constant. The cone peak or valley corresponds to the dates around the Spring Festival during which the gravity law does not hold.

Figure 6
figure 6

Evolution of the exponents \(\alpha_{1}\) of daily directed and undirected freight highway transportation networks. (a) Scatter data of \(F_{ij}\) with respect to \(P_{i}P_{j}/d_{ij}^{2}\) for the directed network. (b) Binning data of \(F_{ij}\) with respect to \(P_{i}P_{j}/d_{ij}^{2}\) for the directed network. (c) Scatter data of \(W_{ij}\) with respect to \(P_{i}P_{j}/d_{ij}^{2}\) for the undirected network. (d) Binning data of \(W_{ij}\) with respect to \(P_{i}P_{j}/d_{ij}^{2}\) for the undirected network

3.3 Per capita GDP in the traditional gravity law

3.3.1 Whole transportation networks

Figure 7(a) shows the scatter plot of \(F_{ij}\) with respect to \((G_{i}/P_{i})(G_{j}/P_{j})/d_{ij}^{2}\) for the directed network. When M in Eq. (4) stands for per capita GDP, the regression equation of the gravity law reads

$$ \lg F_{ij} = \alpha_{0}+\alpha_{1}\lg \bigl[(G_{i}/P_{i}) (G_{j}/P_{j})/d_{ij}^{2} \bigr] + \epsilon, $$
(10)

where ϵ is the error term. We obtain that \(\alpha_{0}=4.772\pm0.030\) and \(\alpha_{1}=0.672\pm0.006\), where the adjusted \(R^{2}\) statistic is 0.328, the F statistic and p-value for the full model are respectively 45,778 and 0.000, and an estimate of the error variance is 0.452. We bin the data with respect to F and illustrate the results in Fig. 7(b). We observe that there is a power-law dependence when F is greater than about 100. A regression shows that \(\alpha_{0}=8.961\pm0.145\) and \(\alpha_{1}=1.496\pm0.035\) with their p-values being 0.0000 and 0.0000. The adjusted \(R^{2}\) statistic is 0.990 and the F statistic and p-value for the full model are respectively 1830 and 0.0000.

Figure 7
figure 7

Testing the traditional gravity law with per capita GDP for the directed and undirected freight highway transportation networks constructed over five months. (a) Scatter plot of \(F_{ij}\) with respect to \((G_{i}/P_{i})(G_{j}/P_{j})/d_{ij}^{2}\) for the directed network. (b) Binning plot of \(F_{ij}\) with respect to \((G_{i}/P_{i})(G_{j}/P_{j})/d_{ij}^{2}\) for the directed network. (c) Scatter plot of \(W_{ij}\) with respect to \((G_{i}/P_{i})(G_{j}/P_{j})/d_{ij}^{2}\) for the undirected network. (d) Binning plot of \(W_{ij}\) with respect to \((G_{i}/P_{i})(G_{j}/P_{j})/d_{ij}^{2}\) for the undirected network

Figure 7(c) shows the scatter plot of \(W_{ij}\) with respect to \((G_{i}/P_{i})(G_{j}/P_{j})/d_{ij}^{2}\) for the undirected network. When M in Eq. (5) stands for per capita GDP, the regression equation of the gravity law reads

$$ \lg W_{ij} = \alpha_{0}+\alpha_{1}\lg \bigl[(G_{i}/P_{i}) (G_{j}/P_{j})/d_{ij}^{2} \bigr] + \epsilon. $$
(11)

We obtain that \(\alpha_{0}=5.416\pm0.040\) and \(\alpha_{1}=0.740\pm0.008\), where the adjusted \(R^{2}\) statistic is 0.387, the F statistic and p-value for the full model are respectively 32,211 and 0.000, and an estimate of the error variance is 0.437. We bin the data with respect to W and illustrate the results in Fig. 7(d). We observe that there is a power-law dependence when W is greater than about 200. A regression shows that \(\alpha_{0}=8.215\pm0.143\) and \(\alpha_{1}=1.257\pm0.035\) with the p-values being 0.0000 and 0.0000. The adjusted \(R^{2}\) statistic is 0.988 and the F statistic and p-value for the full model are respectively 1266 and 0.0000.

We find that, for the scatter plots, the adjusted \(R^{2}\) statistic for the undirected HFTN (0.387) is greater than that for the directed HFTN (0.328). This result is visible in Fig. 7, which shows that the scatter plot is thinner for \(W_{ij}\) when compared with the one for \(F_{ij}\).

3.3.2 Daily transportation networks

We now test the gravity law with daily directed and undirected freight highway transportation networks. We find that most of the daily networks exhibit the gravity law. As an example, the results for the directed network on 15 January 2019 are illustrated in Fig. 8(a). Regression of Eq. (10) for the scatter data points gives that \(\alpha_{0}=1.185\pm0.027\) and \(\alpha_{1}=0.185\pm0.006\), where the adjusted \(R^{2}\) statistic is 0.117, the F statistic and p-value for the full model are respectively 3788 and 0.000, and an estimate of the error variance is 0.141. Regression for the binning data points shows that \(\alpha_{0}=5.933\pm0.624\) and \(\alpha_{1}=1.227\pm0.156\), where the adjusted \(R^{2}\) statistic is 0.913, the F statistic and p-value for the full model are respectively 262 and 0.000, and an estimate of the error variance is 0.012. The results for the undirected network on 15 January 2019 are illustrated in Fig. 8(b). Regression of Eq. (11) for the scatter data points gives that \(\alpha_{0}=1.623\pm0.035\) and \(\alpha_{1}=0.258\pm0.008\), where the adjusted \(R^{2}\) statistic is 0.175, the F statistic and p-value for the full model are respectively 4465 and 0.000, and an estimate of the error variance is 0.163. Regression for the binning data points shows that \(\alpha_{0}=5.947\pm0.611\) and \(\alpha_{1}=1.188\pm0.148\), where the adjusted \(R^{2}\) statistic is 0.917, the F statistic and p-value for the full model are respectively 275 and 0.000, and an estimate of the error variance is 0.012.

Figure 8
figure 8

Testing the traditional gravity law with per capita GDP for the daily directed and undirected freight highway transportation networks. (a) The directed network on 15 January 2019. (b) The directed network on 15 January 2019. (c) The directed network on 4 February 2019. (d) The undirected network on 4 February 2019

However, we find that the daily networks around the Chinese New Year (5 February 2019) do not exhibit the gravity law. The transportation flow decreased significantly during the Spring Festival because most of the truck drivers returned home to gather with their families and most companies were also closed. As an example, the results for the directed network on 4 February 2019 are illustrated in Fig. 8(c). Regression of Eq. (10) for the scatter data points gives that \(\alpha_{0}=0.206\pm0.042\) and \(\alpha_{1}=0.005\pm0.009\), where the adjusted \(R^{2}\) statistic is 0.000, the F statistic and p-value for the full model are respectively 1.300 and 0.254, and an estimate of the error variance is 0.076. Regression for the binning data points shows that \(\alpha_{0}=-1.266\pm11.353\) and \(\alpha_{1}=-0.458\pm2.616\), where the adjusted \(R^{2}\) statistic is 0.015, the F statistic and p-value for the full model are respectively 0.153 and 0.704, and an estimate of the error variance is 0.117. The results for the undirected network on 15 January 2019 are illustrated in Fig. 8(d). Regression of Eq. (11) for the scatter data points gives that \(\alpha_{0}=0.330\pm0.048\) and \(\alpha_{1}=0.027\pm0.011\), where the adjusted \(R^{2}\) statistic is 0.006, the F statistic and p-value for the full model are respectively 25.2 and 0.000, and an estimate of the error variance is 0.086. Regression for the binning data points shows that \(\alpha_{0}=4.802\pm6.791\) and \(\alpha_{1}=0.936\pm1.580\), where the adjusted \(R^{2}\) statistic is 0.122, the F statistic and p-value for the full model are respectively 1.67 and 0.221, and an estimate of the error variance is 0.108. All the four adjusted \(R^{2}\) statistics are close to zero, implying that the term \((G_{i}/P_{i})(G_{j}/P_{j})/d_{ij}^{2}\) does not have explanatory power for the transportation flow \(F_{ij}\) or \(W_{ij}\) and the gravity law is absent.

In Fig. 9, we present the evolution of the exponents \(\alpha_{1}\) of daily directed and undirected freight highway transportation networks. In each case, the exponent fluctuates roughly around a constant. The cone peak or valley corresponds to the dates around the Spring Festival during which the gravity law does not hold.

Figure 9
figure 9

Evolution of the exponents \(\alpha_{1}\) of daily directed and undirected freight highway transportation networks. (a) Scatter data of \(F_{ij}\) with respect to \((G_{i}/P_{i})(G_{j}/P_{j})/d_{ij}^{2}\) for the directed network. (b) Binning data of \(F_{ij}\) with respect to \((G_{i}/P_{i})(G_{j}/P_{j})/d_{ij}^{2}\) for the directed network. (c) Scatter data of \(W_{ij}\) with respect to \((G_{i}/P_{i})(G_{j}/P_{j})/d_{ij}^{2}\) for the undirected network. (d) Binning data of \(W_{ij}\) with respect to \((G_{i}/P_{i})(G_{j}/P_{j})/d_{ij}^{2}\) for the undirected network

3.4 Relationship between exponents

3.4.1 GDP versus population

It is well known that there is an anomalous power-law scaling between the GDP and population at the city level for many countries [29]:

$$ G_{i} \sim P_{i}^{\kappa}, $$
(12)

where the scaling exponent κ fluctuates for different countries. Particularly, empirical evidence shows that \(\kappa=1.15\pm0.08\) with \(R^{2}=0.96\) for 295 Chinese cities in 2002 [29].

In Fig. 10, we show the GDP and population for the 338 Chinese cities in 2017 on log-log scales. It shows that there is a power-law scaling between G and P. A linear regression of the following equation

$$ \lg{G} = \kappa_{0} + \kappa\lg{P} $$
(13)

gives that \(\kappa_{0}=0.391\pm0.083\) and \(\kappa=1.116\pm0.033\), where the corresponding p-values are 0.0000 and 0.0000, the adjusted \(R^{2}\) statistic is 0.771, the F statistic and p-value for the full model are respectively 1132 and 0.0000.

Figure 10
figure 10

Power-law scaling between the GDP and population for the 338 Chinese cities in 2017

3.4.2 Exponents of GDP and population

From Eq. (6), we have \(F_{ij}\sim(G_{i}G_{J})^{\alpha}_{G}\). From Eq. (8), we have \(F_{ij}\sim (P_{i}P_{j})^{\alpha}_{P}\). From Eq. (7), we have \(W_{ij}\sim (G_{i}G_{J})^{\alpha}_{G}\). From Eq. (9), we have \(W_{ij}\sim (P_{i}P_{j})^{\alpha}_{P}\). Combining Eq. (12) and these two gravity laws for GDP and population, it is easy to obtain that

$$ \alpha_{G}\kappa=\alpha_{P}, $$
(14)

where \(\alpha_{G}\) is \(\alpha_{1}\) in the gravity model for GDP and \(\alpha _{P}\) is \(\alpha_{1}\) in the gravity model for population.

We test the relationship (14) with the exponents of the daily transportation networks. The data for the dates during 1 February 2019 to 9 February 2019 are excluded because their corresponding transportation networks do not exhibit the gravity law. In Fig. 11(a), the exponents \(\alpha_{G}\) are those in Fig. 3(a) for the directed networks and Fig. 3(c) for the undirected networks, while the exponents \(\alpha_{P}\) are those in Fig. 6(a) for the directed networks and Fig. 6(c) for the undirected networks. In Fig. 11(b), the exponents \(\alpha_{G}\) are those in Fig. 3(b) for the directed networks and Fig. 3(d) for the undirected networks, while exponents \(\alpha_{P}\) are those in Fig. 6(b) for the directed networks and Fig. 6(d) for the undirected networks. It shows that the data points fall around the line \(\alpha_{G}\kappa=\alpha_{P}\), clsoe to the diagonal.

Figure 11
figure 11

Testing the relationship \(\alpha_{G}\kappa=\alpha_{P}\). The data for the dates during 1 February 2019 to 9 February 2019 are excluded. (a) Exponents \(\alpha_{G}\) are those in Fig. 3(a) for the directed networks and Fig. 3(c) for the undirected networks, while exponents \(\alpha_{P}\) are those in Fig. 6(a) for the directed networks and Fig. 6(c) for the undirected networks. (b) Exponents \(\alpha_{G}\) are those in Fig. 3(b) for the directed networks and Fig. 3(d) for the undirected networks, while exponents \(\alpha_{P}\) are those in Fig. 6(b) for the directed networks and Fig. 6(d) for the undirected networks

If we perform linear regression of the data points for each of the cases in Fig. 11, the four slopes are 0.897, 0.892, 0.889 and 0.923, respectively. They are all less than 1 as predicted by Eq. (14). This deviation is partly due to the fact that the derivation of Eq. (14) does not consider the impact of \(d_{ij}^{2\alpha_{1}}\).

3.4.3 Exponents of per capita GDP and population

From Eq. (10), we have \(F_{ij}\sim[(G_{i}/P_{i})(G_{j}/P_{j})]^{\alpha}_{G/P}\). From Eq. (8), we have \(F_{ij}\sim (P_{i}P_{j})^{\alpha}_{P}\). From Eq. (11), we have \(W_{ij}\sim [(G_{i}/P_{i})(G_{j}/P_{j})]^{\alpha}_{G/P}\). From Eq. (9), we have \(W_{ij}\sim (P_{i}P_{j})^{\alpha}_{P}\). Combining Eq. (12) and these two gravity laws for GDP and population, it is easy to obtain that

$$ (\kappa-1)\alpha_{G/P}=\alpha_{P}, $$
(15)

where \(\alpha_{G}\) is \(\alpha_{1}\) in the gravity model for GDP and \(\alpha _{P}\) is \(\alpha_{1}\) in the gravity model for population.

We test the relationship (15) with the exponents of the daily transportation networks. The data for the dates during 1 February 2019 to 9 February 2019 are excluded because their corresponding transportation networks do not exhibit the gravity law. In Fig. 12(a), the exponents \(\alpha_{G/P}\) are those in Fig. 9(a) for the directed networks and Fig. 9(c) for the undirected networks, while the exponents \(\alpha_{P}\) are those in Fig. 6(a) for the directed networks and Fig. 6(c) for the undirected networks. In Fig. 12, the exponents \(\alpha _{G/P}\) are those in Fig. 9(b) for the directed networks and Fig. 9(d) for the undirected networks, while the exponents \(\alpha_{P}\) are those in Fig. 6(b) for the directed networks and Fig. 6(d) for the undirected networks.

Figure 12
figure 12

Testing the relationship \((\kappa-1)\alpha_{G/P}=\alpha_{P}\). The data for the dates during 1 February 2019 to 9 February 2019 are excluded. (a) Exponents \(\alpha_{G/P}\) are those in Fig. 9(a) for the directed networks and Fig. 9(c) for the undirected networks, while exponents \(\alpha_{P}\) are those in Fig. 6(a) for the directed networks and Fig. 6(c) for the undirected networks. (b) Exponents \(\alpha_{G/P}\) are those in Fig. 9(b) for the directed networks and Fig. 9(d) for the undirected networks, while exponents \(\alpha_{P}\) are those in Fig. 6(b) for the directed networks and Fig. 6(d) for the undirected networks

It shows that the data points in each plot fall around a straight line. However, they are far away from \((\kappa-1)\alpha_{G/P}=\alpha_{P}\). This deviation is partly due to the fact that the derivation of Eq. (15) does not consider the impact of \(d_{ij}^{2\alpha_{1}}\). More importantly, it shows that there are other factors influencing the transportation flow. In other words, the underlying “true model” would be more complicated than the gravity law studied in this work.

4 The modified gravity model

In the perspective of directed complex networks, the modified gravity model states that the edge flow \(F_{ij}\) between two nodes i and j takes the form of

$$ F_{ij} = C {M_{i}^{\alpha_{1}}M_{j}^{\alpha_{2}}}/{d_{ij}^{\alpha_{3}}} $$
(16)

for \(i\neq{j}\), where C is a constant, \(d_{ij}\) stands for the distance between i and j, and \(M_{i}\) and \(M_{j}\) stand respectively for the economic dimensions of the two nodes i and j that are being measured. For undirected transportation networks, we have

$$ W_{ij} = C{M_{i}^{\alpha_{1}}M_{j}^{\alpha_{2}}}/{d_{ij}^{\alpha_{3}}} $$
(17)

for \(j>i\). In our analysis, we consider M to be GDP (G), population (P) and per capita GDP (\(G/P\)), respectively.

4.1 GDP in the modified gravity law

4.1.1 Whole transportation networks

When M in Eq. (16) stands for GDP, the regression equation of the gravity law reads

$$ \lg F_{ij} = \alpha_{0}+\alpha_{1} \lg{G_{i}} + \alpha_{2}\lg{G_{j}}- \alpha_{3}\lg {d_{ij}} + \epsilon, $$
(18)

where ϵ is the error term. We obtain that \(\alpha_{0}=1.171\pm0.063\), \(\alpha_{1}=0.621\pm0.008\), \(\alpha_{2}=0.637\pm 0.009\), and \(\alpha_{3}=1.191\pm0.013\), where the adjusted \(R^{2}\) statistic is 0.477, the F statistic and p-value for the full model are respectively 28,447 and 0.000, and an estimate of the error variance is 0.352. Figure 13(a) shows the scatter plot of \(F_{ij}\) with respect to \({G_{i}^{\hat{\alpha}_{1}}G_{j}^{\hat{\alpha }_{2}}}{d_{ij}^{\hat{\alpha}_{3}}}\) for the directed network. We bin the data with respect to F and illustrate \(F_{ij}\) against \({G_{i}^{\hat{\alpha}_{1}}G_{j}^{\hat{\alpha}_{2}}}{d_{ij}^{\hat{\alpha}_{3}}}\) in Fig. 13(b). We observe that there is a power-law dependence when F is greater than about 30:

$$ F_{ij} = \alpha_{0} + \alpha_{1} \lg \bigl[{G_{i}^{\hat{\alpha}_{1}}G_{j}^{\hat {\alpha}_{2}}}/{d_{ij}^{\hat{\alpha}_{3}}} \bigr] + \epsilon. $$
(19)

A regression shows that \(\alpha_{0}=1.153\pm0.031\) and \(\alpha_{1}=1.578\pm0.028\) with their p-values being 0.0000 and 0.0000. The adjusted \(R^{2}\) statistic is 0.995, and the F statistic and p-value for the full model are respectively 3258 and 0.0000.

Figure 13
figure 13

Testing the modified gravity law with GDP for the directed and undirected freight highway transportation networks constructed over five months. (a) Scatter plot of \(F_{ij}\) with respect to \(G_{i}^{\alpha_{1}}G_{j}^{\alpha_{2}}/d_{ij}^{\alpha_{3}}\) for the directed network. (b) Binning plot of \(F_{ij}\) with respect to \(G_{i}^{\alpha _{1}}G_{j}^{\alpha_{2}}/d_{ij}^{\alpha_{3}}\) for the directed network. (c) Scatter plot of \(W_{ij}\) with respect to \(G_{i}^{\alpha_{1}}G_{j}^{\alpha _{2}}/d_{ij}^{\alpha_{3}}\) for the undirected network. (d) Binning plot of \(W_{ij}\) with respect to \(G_{i}^{\alpha_{1}}G_{j}^{\alpha_{2}}/d_{ij}^{\alpha _{3}}\) for the undirected network

When M in Eq. (17) stands for GDP, the regression equation of the gravity law reads

$$ \lg W_{ij} = \alpha_{0}+\alpha_{1} \lg{G_{i}} + \alpha_{2}\lg{G_{j}}- \alpha_{3}\lg {d_{ij}} + \epsilon. $$
(20)

We obtain that \(\alpha_{0}=1.273\pm0.081\), \(\alpha_{1}=0.743\pm0.011\), \(\alpha_{2}=0.649\pm 0.011\), and \(\alpha_{3}=1.255\pm0.016\), where the adjusted \(R^{2}\) statistic is 0.568, the F statistic and p-value for the full model are respectively 22,379 and 0.000, and an estimate of the error variance is 0.308. Figure 13(c) shows the scatter plot of \(W_{ij}\) with respect to \({G_{i}^{\hat{\alpha}_{1}}G_{j}^{\hat{\alpha }_{2}}}{d_{ij}^{\hat{\alpha}_{3}}}\) for the undirected network. We bin the data with respect to F and illustrate \(F_{ij}\) against \({G_{i}^{\hat{\alpha}_{1}}G_{j}^{\hat{\alpha}_{2}}}{d_{ij}^{\hat{\alpha}_{3}}}\) in Fig. 13(d). We observe that there is a power-law dependence when F is greater than about 30:

$$ W_{ij} = \alpha_{0} + \alpha_{1} \lg \bigl[{G_{i}^{\hat{\alpha}_{1}}G_{j}^{\hat {\alpha}_{2}}}/{d_{ij}^{\hat{\alpha}_{3}}} \bigr] + \epsilon. $$
(21)

We bin the data with respect to W and illustrate the results in Fig. 13(d). We observe that there is a power-law dependence when W is greater than about 200. A regression shows that \(\alpha_{0}=1.314\pm0.030\) and \(\alpha_{1}=1.289\pm0.021\) with the p-values being 0.0000 and 0.0000. The adjusted \(R^{2}\) statistic is 0.996, and the F statistic and p-value for the full model are respectively 3791 and 0.0000.

We find that, for the scatter plots, the adjusted \(R^{2}\) statistic for the undirected HFTN (0.568) is greater than that for the directed HFTN (0.477). This result is visible in Fig. 13, which shows that the scatter plot is thinner for \(W_{ij}\) when compared with the one for \(F_{ij}\).

4.1.2 Daily transportation networks

We now test the modified gravity law with daily directed and undirected freight highway transportation networks. We find that most of the daily networks exhibit the modified gravity law. As an example, the results for the directed network on 15 January 2019 are illustrated in Fig. 14(a). Regression of Eq. (18) for the scatter data points gives that \(\alpha_{0}=-0.119\pm0.062\), \(\alpha_{1}=0.242\pm0.010\), \(\alpha_{2}=0.202\pm 0.010\), and \(\alpha_{3}=0.347\pm0.012\), where the adjusted \(R^{2}\) statistic is 0.195, the F statistic and p-value for the full model are respectively 2315 and 0.000, and an estimate of the error variance is 0.128. Regression of Eq. (19) for the binning data points shows that \(\alpha_{0}=-1.604\pm0.233\) and \(\alpha_{1}=4.240\pm0.370\), where the adjusted \(R^{2}\) statistic is 0.957, the F statistic and p-value for the full model are respectively 556 and 0.000, and an estimate of the error variance is 0.006. The results for the undirected network on 15 January 2019 are illustrated in Fig. 14(b). Regression of Eq. (20) for the scatter data points gives that \(\alpha_{0}=-0.139\pm0.078\), \(\alpha_{1}=0.333\pm0.013\), \(\alpha_{2}=0.274\pm 0.012\), and \(\alpha_{3}=0.482\pm0.016\), where the adjusted \(R^{2}\) statistic is 0.286, the F statistic and p-value for the full model are respectively 2815 and 0.000, and an estimate of the error variance is 0.141. Regression of Eq. (21) for the binning data points shows that \(\alpha_{0}=-1.241\pm0.180\) and \(\alpha_{1}=2.977\pm0.233\), where the adjusted \(R^{2}\) statistic is 0.965, the F statistic and p-value for the full model are respectively 694 and 0.000, and an estimate of the error variance is 0.005.

Figure 14
figure 14

Testing the modified gravity law with GDP for the daily directed and undirected freight highway transportation networks. (a) The directed network on 15 January 2019. (b) The directed network on 15 January 2019. (c) The directed network on 4 February 2019. (d) The undirected network on 4 February 2019

However, we find that the daily networks around the Chinese New Year (5 February 2019) do not exhibit the gravity law. The transportation flow decreased significantly during the Spring Festival because most of the truck drivers returned home to gather with their families and most companies were also closed. As an example, the results for the directed network on 4 February 2019 are illustrated in Fig. 14(c). Regression of Eq. (18) for the scatter data points gives that \(\alpha_{0}=-0.342\pm0.106\), \(\alpha_{1}=0.067\pm0.017\), \(\alpha_{2}=0.049\pm 0.017\), and \(\alpha_{3}=-0.041\pm0.021\), where the adjusted \(R^{2}\) statistic is 0.022, the F statistic and p-value for the full model are respectively 36.6 and 0.000, and an estimate of the error variance is 0.074. Regression of Eq. (19) for the binning data points shows that \(\alpha_{0}=-11.425\pm10.233\) and \(\alpha_{1}=22.681\pm19.102\), where the adjusted \(R^{2}\) statistic is 0.412, the F statistic and p-value for the full model are respectively 6.999 and 0.024, and an estimate of the error variance is 0.070. The results for the undirected network on 15 January 2019 are illustrated in Fig. 14(d). Regression of Eq. (20) for the scatter data points gives that \(\alpha_{0}=-0.369\pm0.118\), \(\alpha_{1}=0.085\pm0.019\), \(\alpha_{2}=0.077\pm 0.019\), and \(\alpha_{3}=-0.006\pm0.023\), where the adjusted \(R^{2}\) statistic is 0.032, the F statistic and p-value for the full model are respectively 48.8 and 0.000, and an estimate of the error variance is 0.084. Regression of Eq. (21) for the binning data points shows that \(\alpha_{0}=-9.981\pm3.990\) and \(\alpha_{1}=17.909\pm6.637\), where the adjusted \(R^{2}\) statistic is 0.742, the F statistic and p-value for the full model are respectively 34.563 and 0.000, and an estimate of the error variance is 0.032. The two adjusted \(R^{2}\) statistics for the scatter data are close to zero, implying that the term \(G_{i}^{\alpha_{1}}G_{j}^{\alpha _{2}}/d_{ij}^{\alpha_{3}}\) does not have explanatory power for the transportation flow \(F_{ij}\) or \(W_{ij}\) and the modified gravity law is absent.

In Fig. 15, we present the evolution of the exponents \(\alpha_{1}\) of daily directed and undirected freight highway transportation networks. In each case, the exponent fluctuates roughly around a constant. The cone peak or valley corresponds to the dates around the Spring Festival during which the gravity law does not hold.

Figure 15
figure 15

Evolution of the exponents of daily directed and undirected freight highway transportation networks. (a) Scatter data of \(F_{ij}\) with respect to \(G_{i}^{\alpha_{1}}G_{j}^{\alpha_{2}}/d_{ij}^{\alpha_{3}}\) for the directed network. (b) Binning data of \(F_{ij}\) with respect to \(G_{i}^{\alpha_{1}}G_{j}^{\alpha_{2}}/d_{ij}^{\alpha_{3}}\) for the directed network. (c) Scatter data of \(W_{ij}\) with respect to \(G_{i}^{\alpha _{1}}G_{j}^{\alpha_{2}}/d_{ij}^{\alpha_{3}}\) for the undirected network. (d) Binning data of \(W_{ij}\) with respect to \(G_{i}^{\alpha_{1}}G_{j}^{\alpha _{2}}/d_{ij}^{\alpha_{3}}\) for the undirected network

4.2 Population in the modified gravity law

4.2.1 Whole transportation networks

When M in Eq. (16) stands for population, the regression equation of the gravity law reads

$$ \lg F_{ij} = \alpha_{0}+\alpha_{1} \lg{P_{i}} + \alpha_{2}\lg{P_{j}}- \alpha_{3}\lg {d_{ij}} + \epsilon, $$
(22)

where ϵ is the error term. We obtain that \(\alpha_{0}=1.409\pm0.066\), \(\alpha_{1}=0.789\pm0.011\), \(\alpha_{2}=0.721\pm 0.012\), and \(\alpha_{3}=1.192\pm0.013\), where the adjusted \(R^{2}\) statistic is 0.446, the F statistic and p-value for the full model are respectively 25,128 and 0.000, and an estimate of the error variance is 0.372. Figure 16(a) shows the scatter plot of \(F_{ij}\) with respect to \({P_{i}^{\hat{\alpha}_{1}}P_{j}^{\hat{\alpha }_{2}}}{d_{ij}^{\hat{\alpha}_{3}}}\) for the directed network. We bin the data with respect to F and illustrate \(F_{ij}\) against \({P_{i}^{\hat{\alpha}_{1}}P_{j}^{\hat{\alpha}_{2}}}{d_{ij}^{\hat{\alpha}_{3}}}\) in Fig. 16(b). We observe that there is a power-law dependence when F is greater than about 30:

$$ F_{ij} = \alpha_{0} + \alpha_{1} \lg \bigl[{P_{i}^{\hat{\alpha}_{1}}P_{j}^{\hat {\alpha}_{2}}}/{d_{ij}^{\hat{\alpha}_{3}}} \bigr] + \epsilon. $$
(23)

A regression shows that \(\alpha_{0}=1.539\pm0.024\) and \(\alpha_{1}=1.639\pm0.028\) with their p-values being 0.0000 and 0.0000. The adjusted \(R^{2}\) statistic is 0.995, and the F statistic and p-value for the full model are respectively 3453.6 and 0.0000.

Figure 16
figure 16

Testing the modified gravity law with population for the directed and undirected freight highway transportation networks constructed over five months. (a) Scatter plot of \(F_{ij}\) with respect to \(P_{i}^{\alpha_{1}}P_{j}^{\alpha_{2}}/d_{ij}^{\alpha_{3}}\) for the directed network. (b) Binning plot of \(F_{ij}\) with respect to \(P_{i}^{\alpha _{1}}P_{j}^{\alpha_{2}}/d_{ij}^{\alpha_{3}}\) for the directed network. (c) Scatter plot of \(W_{ij}\) with respect to \(P_{i}^{\alpha_{1}}P_{j}^{\alpha _{2}}/d_{ij}^{\alpha_{3}}\) for the undirected network. (d) Binning plot of \(W_{ij}\) with respect to \(P_{i}^{\alpha_{1}}P_{j}^{\alpha_{2}}/d_{ij}^{\alpha _{3}}\) for the undirected network

When M in Eq. (17) stands for population, the regression equation of the gravity law reads

$$ \lg W_{ij} = \alpha_{0}+\alpha_{1} \lg{P_{i}} + \alpha_{2}\lg{P_{j}}- \alpha_{3}\lg {d_{ij}} + \epsilon. $$
(24)

We obtain that \(\alpha_{0}=1.593\pm0.085\), \(\alpha_{1}=0.868\pm0.014\), \(\alpha_{2}=0.797\pm 0.015\), and \(\alpha_{3}=1.271\pm0.017\), where the adjusted \(R^{2}\) statistic is 0.531, the F statistic and p-value for the full model are respectively 19,295 and 0.000, and an estimate of the error variance is 0.334. Figure 16(c) shows the scatter plot of \(W_{ij}\) with respect to \({P_{i}^{\hat{\alpha}_{1}}P_{j}^{\hat{\alpha }_{2}}}{d_{ij}^{\hat{\alpha}_{3}}}\) for the undirected network. We bin the data with respect to F and illustrate \(F_{ij}\) against \({P_{i}^{\hat{\alpha}_{1}}P_{j}^{\hat{\alpha}_{2}}}{d_{ij}^{\hat{\alpha}_{3}}}\) in Fig. 16(d). We observe that there is a power-law dependence when F is greater than about 30:

$$ W_{ij} = \alpha_{0} + \alpha_{1} \lg \bigl[{P_{i}^{\hat{\alpha}_{1}}P_{j}^{\hat {\alpha}_{2}}}/{d_{ij}^{\hat{\alpha}_{3}}} \bigr] + \epsilon. $$
(25)

We bin the data with respect to W and illustrate the results in Fig. 16(d). We observe that there is a power-law dependence when W is greater than about 200. A regression shows that \(\alpha_{0}=1.741\pm0.024\) and \(\alpha_{1}=1.333\pm0.022\) with the p-values being 0.0000 and 0.0000. The adjusted \(R^{2}\) statistic is 0.995, and the F statistic and p-value for the full model are respectively 3631 and 0.0000.

We find that, for the scatter plots, the adjusted \(R^{2}\) statistic for the undirected HFTN (0.531) is greater than that for the directed HFTN (0.446). This result is visible in Fig. 16, which shows that the scatter plot is thinner for \(W_{ij}\) when compared with the one for \(F_{ij}\).

4.2.2 Daily transportation networks

We now test the modified gravity law with daily directed and undirected freight highway transportation networks. We find that most of the daily networks exhibit the modified gravity law. As an example, the results for the directed network on 15 January 2019 are illustrated in Fig. 17(a). Regression of Eq. (22) for the scatter data points gives that \(\alpha_{0}=-0.244\pm0.066\), \(\alpha_{1}=0.353\pm0.014\), \(\alpha_{2}=0.251\pm 0.014\), and \(\alpha_{3}=0.336\pm0.013\), where the adjusted \(R^{2}\) statistic is 0.192, the F statistic and p-value for the full model are respectively 2278 and 0.000, and an estimate of the error variance is 0.129. Regression of Eq. (23) for the binning data points shows that \(\alpha_{0}=-2.188\pm0.319\) and \(\alpha_{1}=4.334\pm0.426\), where the adjusted \(R^{2}\) statistic is 0.946, the F statistic and p-value for the full model are respectively 439 and 0.000, and an estimate of the error variance is 0.007. The results for the undirected network on 15 January 2019 are illustrated in Fig. 17(b). Regression of Eq. (24) for the scatter data points gives that \(\alpha_{0}=-0.189\pm0.083\), \(\alpha_{1}=0.420\pm0.017\), \(\alpha_{2}=0.361\pm 0.017\), and \(\alpha_{3}=0.470\pm0.016\), where the adjusted \(R^{2}\) statistic is 0.271, the F statistic and p-value for the full model are respectively 2616 and 0.000, and an estimate of the error variance is 0.144. Regression of Eq. (25) for the binning data points shows that \(\alpha_{0}=-1.427\pm0.210\) and \(\alpha_{1}=3.046\pm0.257\), where the adjusted \(R^{2}\) statistic is 0.960, the F statistic and p-value for the full model are respectively 596 and 0.000, and an estimate of the error variance is 0.006.

Figure 17
figure 17

Testing the modified gravity law with population for the daily directed and undirected freight highway transportation networks. (a) The directed network on 15 January 2019. (b) The directed network on 15 January 2019. (c) The directed network on 4 February 2019. (d) The undirected network on 4 February 2019

However, we find that the daily networks around the Chinese New Year (5 February 2019) do not exhibit the gravity law. The transportation flow decreased significantly during the Spring Festival because most of the truck drivers returned home to gather with their families and most companies were also closed. As an example, the results for the directed network on 4 February 2019 are illustrated in Fig. 17(c). Regression of Eq. (22) for the scatter data points gives that \(\alpha_{0}=-0.223\pm0.114\), \(\alpha_{1}=0.082\pm0.025\), \(\alpha_{2}=0.026\pm 0.024\), and \(\alpha_{3}=-0.037\pm0.021\), where the adjusted \(R^{2}\) statistic is 0.012, the F statistic and p-value for the full model are respectively 20.3 and 0.000, and an estimate of the error variance is 0.075. Regression of Eq. (23) for the binning data points shows that \(\alpha_{0}= -9.526\pm13.747\) and \(\alpha_{1}=24.918\pm33.416\), where the adjusted \(R^{2}\) statistic is 0.216, the F statistic and p-value for the full model are respectively 2.76 and 0.128, and an estimate of the error variance is 0.093. The results for the undirected network on 15 January 2019 are illustrated in Fig. 17(d). Regression of Eq. (24) for the scatter data points gives that \(\alpha_{0}=-0.242\pm0.128\), \(\alpha_{1}=0.097\pm0.027\), \(\alpha_{2}=0.066\pm 0.027\), and \(\alpha_{3}=-0.005\pm0.024\), where the adjusted \(R^{2}\) statistic is 0.017, the F statistic and p-value for the full model are respectively 24.7 and 0.000, and an estimate of the error variance is 0.085. Regression of Eq. (25) for the binning data points shows that \(\alpha_{0}=-12.333\pm5.064\) and \(\alpha_{1}=28.166\pm10.873\), where the adjusted \(R^{2}\) statistic is 0.726, the F statistic and p-value for the full model are respectively 31.854 and 0.000, and an estimate of the error variance is 0.034. The two adjusted \(R^{2}\) statistics for the scatter data are close to zero, implying that the term \(P_{i}^{\alpha_{1}}P_{j}^{\alpha _{2}}/d_{ij}^{\alpha_{3}}\) does not have explanatory power for the transportation flow \(F_{ij}\) or \(W_{ij}\) and the modified gravity law is absent.

In Fig. 18, we present the evolution of the exponents \(\alpha_{1}\) of daily directed and undirected freight highway transportation networks. In each case, the exponent fluctuates roughly around a constant. The cone peak or valley corresponds to the dates around the Spring Festival during which the gravity law does not hold.

Figure 18
figure 18

Evolution of the exponents of daily directed and undirected freight highway transportation networks. (a) Scatter data of \(F_{ij}\) with respect to \(P_{i}^{\alpha_{1}}P_{j}^{\alpha_{2}}/d_{ij}^{\alpha_{3}}\) for the directed network. (b) Binning data of \(F_{ij}\) with respect to \(P_{i}^{\alpha_{1}}P_{j}^{\alpha_{2}}/d_{ij}^{\alpha_{3}}\) for the directed network. (c) Scatter data of \(W_{ij}\) with respect to \(P_{i}^{\alpha _{1}}P_{j}^{\alpha_{2}}/d_{ij}^{\alpha_{3}}\) for the undirected network. (d) Binning data of \(W_{ij}\) with respect to \(P_{i}^{\alpha_{1}}P_{j}^{\alpha _{2}}/d_{ij}^{\alpha_{3}}\) for the undirected network

4.3 Per capita GDP in the modified gravity law

4.3.1 Whole transportation networks

When M in Eq. (16) stands for per capita GDP, the regression equation of the modified gravity law reads

$$ \lg F_{ij} = \alpha_{0}+\alpha_{1} \lg(G_{i}/P_{i}) + \alpha_{2}\lg (G_{j}/P_{j})-\alpha_{3}\lg{d_{ij}} + \epsilon, $$
(26)

where ϵ is the error term. We obtain that \(\alpha_{0}=4.984\pm0.050\), \(\alpha_{1}=0.544\pm0.018\), \(\alpha_{2}=0.681\pm 0.019\), and \(\alpha_{3}=1.385\pm0.014\), where the adjusted \(R^{2}\) statistic is 0.330, the F statistic and p-value for the full model are respectively 15,365 and 0.000, and an estimate of the error variance is 0.451. Figure 19(a) shows the scatter plot of \(F_{ij}\) with respect to \({(G_{i}/P_{i})^{\hat{\alpha}_{1}}(G_{j}/P_{j})^{\hat {\alpha}_{2}}}/{d_{ij}^{\hat{\alpha}_{3}}}\) for the directed network. We bin the data with respect to F and illustrate \(F_{ij}\) against \({(G_{i}/P_{i})^{\hat{\alpha}_{1}}(G_{j}/P_{j})^{\hat{\alpha}_{2}}}/{d_{ij}^{\hat {\alpha}_{3}}}\) in Fig. 19(b). We observe that there is a power-law dependence when F is greater than about 30:

$$ F_{ij} = \alpha_{0} + \alpha_{1} \lg \bigl[{(G_{i}/P_{i})^{\hat{\alpha }_{1}}(G_{j}/P_{j})^{\hat{\alpha}_{2}}}/{d_{ij}^{\hat{\alpha}_{3}}} \bigr] + \epsilon. $$
(27)

A regression shows that \(\alpha_{0}=9.317\pm0.158\) and \(\alpha_{1}=2.191\pm0.053\) with their p-values being 0.0000 and 0.0000. The adjusted \(R^{2}\) statistic is 0.990, and the F statistic and p-value for the full model are respectively 1736 and 0.0000.

Figure 19
figure 19

Testing the modified gravity law with population for the directed and undirected freight highway transportation networks constructed over five months. (a) Scatter plot of \(F_{ij}\) with respect to \((G_{i}/P_{i})^{\alpha_{1}}(G_{j}/P_{j})^{\alpha_{2}}/d_{ij}^{\alpha_{3}}\) for the directed network. (b) Binning plot of \(F_{ij}\) with respect to \((G_{i}/P_{i})^{\alpha_{1}}(G_{j}/P_{j})^{\alpha_{2}}/d_{ij}^{\alpha_{3}}\) for the directed network. (c) Scatter plot of \(W_{ij}\) with respect to \((G_{i}/P_{i})^{\alpha_{1}}(G_{j}/P_{j})^{\alpha_{2}}/d_{ij}^{\alpha_{3}}\) for the undirected network. (d) Binning plot of \(W_{ij}\) with respect to \((G_{i}/P_{i})^{\alpha_{1}}(G_{j}/P_{j})^{\alpha_{2}}/d_{ij}^{\alpha_{3}}\) for the undirected network

When M in Eq. (17) stands for population, the regression equation of the gravity law reads

$$ \lg W_{ij} = \alpha_{0}+\alpha_{1}\lg (G_{i}/P_{i} ) + \alpha_{2}\lg (G_{j}/P_{j} )-\alpha_{3}\lg{d_{ij}} + \epsilon. $$
(28)

We obtain that \(\alpha_{0}=5.621\pm0.067\), \(\alpha_{1}=0.660\pm0.026\), \(\alpha_{2}=0.701\pm 0.023\), and \(\alpha_{3}=1.520\pm0.019\), where the adjusted \(R^{2}\) statistic is 0.388, the F statistic and p-value for the full model are respectively 10,769 and 0.000, and an estimate of the error variance is 0.436. Figure 19(c) shows the scatter plot of \(W_{ij}\) with respect to \((G_{i}/P_{i})^{\alpha_{1}}(G_{j}/P_{j})^{\alpha _{2}}/d_{ij}^{\alpha_{3}}\) for the undirected network. We bin the data with respect to F and illustrate \(F_{ij}\) against \({(G_{i}/P_{i})^{\hat{\alpha}_{1}}(G_{j}/P_{j})^{\hat{\alpha}_{2}}}/{d_{ij}^{\hat {\alpha}_{3}}}\) in Fig. 19(d). We observe that there is a power-law dependence when F is greater than about 30:

$$ W_{ij} = \alpha_{0} + \alpha_{1} \lg \bigl[{(G_{i}/P_{i})^{\hat{\alpha }_{1}}(G_{j}/P_{j})^{\hat{\alpha}_{2}}}/{d_{ij}^{\hat{\alpha}_{3}}} \bigr] + \epsilon. $$
(29)

We bin the data with respect to W and illustrate the results in Fig. 19(d). We observe that there is a power-law dependence when W is greater than about 200. A regression shows that \(\alpha_{0}=8.641\pm0.140\) and \(\alpha_{1}=1.726\pm0.043\) with the p-values being 0.0000 and 0.0000. The adjusted \(R^{2}\) statistic is 0.990, and the F statistic and p-value for the full model are respectively 1642 and 0.0000.

We find that, for the scatter plots, the adjusted \(R^{2}\) statistic for the undirected HFTN (0.388) is greater than that for the directed HFTN (0.330). This result is visible in Fig. 19, which shows that the scatter plot is thinner for \(W_{ij}\) when compared with the one for \(F_{ij}\).

4.3.2 Daily transportation networks

We now test the modified gravity law with daily directed and undirected freight highway transportation networks. We find that most of the daily networks exhibit the modified gravity law. As an example, the results for the directed network on 15 January 2019 are illustrated in Fig. 20(a). Regression of Eq. (26) for the scatter data points gives that \(\alpha_{0}= 1.147\pm0.043\), \(\alpha_{1}=0.199\pm0.019\), \(\alpha_{2}=0.197\pm 0.019\), and \(\alpha_{3}=0.364\pm0.013\), where the adjusted \(R^{2}\) statistic is 0.117, the F statistic and p-value for the full model are respectively 1264 and 0.000, and an estimate of the error variance is 0.141. Regression of Eq. (27) for the binning data points shows that \(\alpha_{0}=5.689\pm0.583\) and \(\alpha_{1}=6.644\pm0.830\), where the adjusted \(R^{2}\) statistic is 0.916, the F statistic and p-value for the full model are respectively 272 and 0.000, and an estimate of the error variance is 0.012. The results for the undirected network on 15 January 2019 are illustrated in Fig. 20(b). Regression of Eq. (28) for the scatter data points gives that \(\alpha_{0}= 1.582\pm0.056\), \(\alpha_{1}=0.271\pm0.024\), \(\alpha_{2}=0.272\pm 0.023\), and \(\alpha_{3}=0.509\pm0.017\), where the adjusted \(R^{2}\) statistic is 0.175, the F statistic and p-value for the full model are respectively 1489 and 0.000, and an estimate of the error variance is 0.163. Regression of Eq. (29) for the binning data points shows that \(\alpha_{0}= 5.773\pm0.584\) and \(\alpha_{1}=4.622\pm0.569\), where the adjusted \(R^{2}\) statistic is 0.918, the F statistic and p-value for the full model are respectively 280 and 0.000, and an estimate of the error variance is 0.011.

Figure 20
figure 20

Testing the modified gravity law with per capita GDP for the daily directed and undirected freight highway transportation networks. (a) The directed network on 15 January 2019. (b) The directed network on 15 January 2019. (c) The directed network on 4 February 2019. (d) The undirected network on 4 February 2019

However, we find that the daily networks around the Chinese New Year (5 February 2019) do not exhibit the gravity law. The transportation flow decreased significantly during the Spring Festival because most of the truck drivers returned home to gather with their families and most companies were also closed. As an example, the results for the directed network on 4 February 2019 are illustrated in Fig. 20(c). Regression of Eq. (26) for the scatter data points gives that \(\alpha_{0}=-0.103\pm0.071\), \(\alpha_{1}=0.097\pm0.032\), \(\alpha_{2}=0.124\pm 0.032\), and \(\alpha_{3}=-0.039\pm0.021\), where the adjusted \(R^{2}\) statistic is 0.023, the F statistic and p-value for the full model are respectively 37.4 and 0.000, and an estimate of the error variance is 0.074. Regression of Eq. (27) for the binning data points shows that \(\alpha_{0}=-8.942\pm4.624\) and \(\alpha_{1}=32.579\pm15.580\), where the adjusted \(R^{2}\) statistic is 0.685, the F statistic and p-value for the full model are respectively 21.7 and 0.001, and an estimate of the error variance is 0.037. The results for the undirected network on 15 January 2019 are illustrated in Fig. 20(d). Regression of Eq. (28) for the scatter data points gives that \(\alpha_{0}= 0.007\pm0.079\), \(\alpha_{1}=0.122\pm0.037\), \(\alpha_{2}=0.156\pm 0.034\), and \(\alpha_{3}= 0.004\pm0.023\), where the adjusted \(R^{2}\) statistic is 0.028, the F statistic and p-value for the full model are respectively 42.6 and 0.000, and an estimate of the error variance is 0.084. Regression of Eq. (29) for the binning data points shows that \(\alpha_{0}= -2.627\pm2.288\) and \(\alpha_{1}=15.534\pm10.407\), where the adjusted \(R^{2}\) statistic is 0.468, the F statistic and p-value for the full model are respectively 10.6 and 0.007, and an estimate of the error variance is 0.065. The two adjusted \(R^{2}\) statistics for the scatter data are close to zero, implying that the term \((G_{i}/P_{i})^{\alpha_{1}}(G_{j}/P_{j})^{\alpha _{2}}/d_{ij}^{\alpha_{3}}\) does not have explanatory power for the transportation flow \(F_{ij}\) or \(W_{ij}\) and the modified gravity law is absent.

In Fig. 21, we present the evolution of the exponents \(\alpha_{1}\) of daily directed and undirected freight highway transportation networks. In each case, the exponent fluctuates roughly around a constant. The cone peak or valley corresponds to the dates around the Spring Festival during which the gravity law does not hold.

Figure 21
figure 21

Evolution of the exponents of daily directed and undirected freight highway transportation networks. (a) Scatter data of \(F_{ij}\) with respect to \((G_{i}/P_{i})^{\alpha_{1}}(G_{j}/P_{j})^{\alpha_{2}}/d_{ij}^{\alpha _{3}}\) for the directed network. (b) Binning data of \(F_{ij}\) with respect to \((G_{i}/P_{i})^{\alpha_{1}}(G_{j}/P_{j})^{\alpha_{2}}/d_{ij}^{\alpha_{3}}\) for the directed network. (c) Scatter data of \(W_{ij}\) with respect to \((G_{i}/P_{i})^{\alpha_{1}}(G_{j}/P_{j})^{\alpha_{2}}/d_{ij}^{\alpha_{3}}\) for the undirected network. (d) Binning data of \(W_{ij}\) with respect to \((G_{i}/P_{i})^{\alpha_{1}}(G_{j}/P_{j})^{\alpha_{2}}/d_{ij}^{\alpha_{3}}\) for the undirected network

5 Summary and discussions

In this work, we constructed the directed and undirected highway freight transportation networks between 338 Chinese cities using about 15.06 million truck transportation records in five months (2019/01/05–2019/05/31) and tested the traditional and modified gravity laws using GDP, population and per capita GDP as the node strength. It is found that the gravity law holds over about two orders of magnitude for the whole sample, as well as the daily samples, except for the days around the Spring Festival during which the daily sample sizes are significantly small. Accordingly, the daily exponents of the gravity law are stable except during the Spring Festival period. Other than the Spring Festival holiday, there are a number of holidays in China. However, we observe that there show no abnormal phenomena in the time series of \(\alpha_{1}\) other than the Spring Festival. These seemingly counterintuitive results are explained by the fact that the Spring Festival is special other than other holidays. It is the tradition that almost all Chinese stayed in other places will return to their hometowns to have dinner with all family members especially parents on the Eve of the Spring Festival. Accordingly, most companies and factories are closed during the Spring Festival for one or two weeks, resulting in a sharp decrease in the demand of freight transportation.

We confirmed that there is a power-law scaling between GDP and population at the city level. We carried out a scaling analysis and obtained the relationship between the exponents of different gravity laws. Using daily transportation networks, the scaling relationship between the GDP-based gravity law and the population-based gravity law has been well verified with mild deviations. The feasible regions for the gravity laws differ from each other (see the figures). However, the scaling relationship could not be confirmed when the per capita GDP-based gravity law is considered. To some extent, this observation is consistent with the fact that the per capita GDP-based gravity law gives significantly smaller adjusted \(R^{2}\) values.

The adjusted \(R^{2}\) values show that the gravity law has higher explanatory power for the undirected highway freight transportation networks than for the directed highway freight transportation networks. However, the traditional and modified gravity laws have comparable explanatory power according to the fact that their corresponding adjusted \(R^{2}\) values are very close to each other. In addition, although the GDP-based and the population based models already have quite high explanatory power for the transportation flows (more than 40% for directed networks and more than 50% for undirected networks), additional factors that account for the unexplained components call for further research. One possible direction is to consider the comparative advantage of different cities embedded in the industrial structure of China as well as different demands from different cities.

We note that the fitted parameters or exponents are not general. The literature has shown that the exponents could be different due to different systems (air lines, trains, buses, et al.), different time periods, and different places. In addition, there are other newly-proposed important models [4, 6] that should be investigated using this huge data base. These interesting problems will be researched in future works.