# Analysis and Forecast of Traffic Flow between Urban Functional Areas Based on Ride-Hailing Trajectories

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

- We propose an area division method for dividing functional areas based on the urban road network and AOIs, which retains the geographic information of the urban area and classifies the functions of the area.
- We propose an attention-based gated graph convolutional network (AG-GCN) method for traffic flow forecast between functional areas. This method considers the network topology of functional areas and the time periodicity of traffic flow between them. Moreover, it allocates the weights of traffic flow between functional areas through the attention mechanism layer to improve forecasting accuracy.
- We propose a spatiotemporal feature extraction method based on the functional area network and multi-fragment sequence. This method effectively extracts more precise rules and trend features of traffic flow between functional areas in terms of time and space, thereby improving the forecasting performance of traffic flow between functional areas.

## 2. Related Works

## 3. Definitions

**Definition**

**1.**

**Definition**

**2.**

**Definition**

**3.**

**Definition**

**4.**

**Definition**

**5.**

## 4. Methodology

#### 4.1. Framework

#### 4.2. Functional Area Division

#### 4.3. Spatial Dependency Modeling

#### 4.4. Temporal Dynamics Modeling

#### 4.5. Attention Mechanism

## 5. Results and Analysis

#### 5.1. Data Description

#### 5.2. Evaluation Metrics and Baseline Methods for Comparison

#### 5.2.1. Evaluation Index

^{2}), and accuracy are taken as evaluation indicators in this paper and are defined as follows:

^{2}):

^{2}calculates the correlation coefficient. The larger the value, the better the prediction effect.

#### 5.2.2. Benchmarking Methods

- (1)
- Historical average (HA) model, which uses the average traffic information of the historical period as a forecast;
- (2)
- Support vector regression (SVR) model [26], which is a supervised learning algorithm, is often used for time series prediction and has excellent generalization ability;
- (3)
- Graph convolutional network (GCN) model, which is a neural network architecture that operates on graph data;
- (4)
- (5)
- Time graph convolutional network (T-GCN), which is a combination of graph convolutional network (GCN) and gated recursive unit (GRU) that can capture spatiotemporal characteristics and learn change trends.

#### 5.3. Experimental Setup

#### 5.4. Experimental Result Analysis

- (1)
- Compared to traditional learning methods, deep learning approaches are better suited for handling complex time-series data and extracting features, which can lead to an improved accuracy in forecasting functional area traffic flows. As shown in Table 2, both AG-GCN and T-GCN models, which consider both temporal and spatial features, outperform GCN and GRU models that only consider a single factor.
- (2)
- Among the deep learning methods, the AG-GCN model demonstrates a stronger predictive power than the T-GCN model. This is because the AG-GCN model incorporates an attention mechanism that can more effectively capture the spatiotemporal features of functional area traffic flows and reduce prediction errors. For instance, in forecasting functional area traffic flows 10 min ahead, the AG-GCN model reduces the root mean square error (RMSE) by 4.63% compared to the T-GCN model.
- (3)
- Moreover, the AG-GCN model is more appropriate for long-term predictions. While the predictive ability of all models declines as the prediction time step increases due to error accumulation, the AG-GCN model maintains the lowest RMSE and mean absolute error (MAE) at different time steps (10 min, 20 min, 30 min, or 60 min). This suggests that the AG-GCN model can achieve multi-step predictions of functional area traffic flows.
- (4)
- The AG-GCN model outperformed other benchmark models in forecasting functional area traffic flows based on real datasets. Figure 4 shows the inflow prediction of different models within a day (with 10 min time steps). It can be seen from the figure that the AG-GCN model maintained good and stable prediction performance for 10, 20, 30, and 60 min, while other benchmark models showed a decline of about 1% in prediction performance with increasing time steps. This indicates that the AG-GCN model can learn the complex patterns of functional area traffic flows and capture its spatiotemporal variations.

#### 5.5. Visualization

#### 5.5.1. Heat Map

#### 5.5.2. Temporal and Spatial Trend Analysis

#### 5.5.3. Traffic Flow between Functional Areas

- (1)
- There are significant differences in the inflow and outflow of traffic between different functional areas, for example, the traffic volume between commercial zones and residential zones is much larger than that between hospitals and schools;
- (2)
- There are certain patterns in inflow and outflow of traffic between different functional areas, for example, the peak value of traffic volume between commercial zones and residential zones is reached during the morning peak hours;
- (3)
- There are the balance or imbalance of supply and demand phenomena between each functional zone and its adjacent areas, for example, commercial zones have a strong attraction to residential zones, while hospitals have a weak influence on schools.

## 6. Conclusions

## Author Contributions

## Funding

## Data Availability Statement

## Conflicts of Interest

## References

- Vlahogianni, E.I.; Karlaftis, M.G.; Golias, J.C. Short-term traffic forecasting: Where we are and where we’re going. Transp. Res. Part C Emerg. Technol.
**2014**, 43, 3–19. [Google Scholar] [CrossRef] - Liao, Z.; Xiao, H.; Liu, S.; Liu, Y.; Yi, A. Impact Assessing of Traffic Lights via GPS Vehicle Trajectories. ISPRS Int. J. Geo. Inf.
**2021**, 10, 769. [Google Scholar] [CrossRef] - Cai, L.; Sha, C.; He, J.; Yao, S. Spatial–Temporal Data Imputation Model of Traffic Passenger Flow Based on Grid Division. ISPRS Int. J. Geo. Inf.
**2023**, 12, 13. [Google Scholar] [CrossRef] - Kang, M.X.; Song, J.P.; Zhou, X.; Fan, P.F.; Li, Z.; Gao, B.W. Survey of network traffic forecast based on deep learning. Comput. Eng. Appl.
**2015**, 7, 1–9. [Google Scholar] - Almatar, K.M. Transit-Oriented Development in Saudi Arabia: Riyadh as a Case Study. Sustainability
**2022**, 14, 16129. [Google Scholar] [CrossRef] - Zhao, Y.; Wei, X.; Liu, Y.; Liao, Z. A Reputation Model of OSM Contributor Based on Semantic Similarity of Ontology Concepts. Appl. Sci.
**2022**, 12, 11363. [Google Scholar] [CrossRef] - Liu, Y.; Qing, R.; Zhao, Y.; Liao, Z. Road Intersection Recognition via Combining Classification Model and Clustering Algorithm Based on GPS Data. ISPRS Int. J. Geo. Inf.
**2022**, 11, 487. [Google Scholar] [CrossRef] - Kumar, S.V.; Vanajakshi, L. Short-term traffic flow prediction using seasonal ARIMA model with limited input data. European Transp. Res. Rev.
**2015**, 7, 1–9. [Google Scholar] [CrossRef][Green Version] - Williams, B.M.; Hoel, L.A. Modeling and Forecasting Vehicular Traffic Flow as a Seasonal ARIMA Process: Theoretical Basis and Empirical Results. J. Transp. Eng.
**2003**, 129, 664–672. [Google Scholar] [CrossRef][Green Version] - Van Der Voort, M.; Dougherty, M.; Watson, S. Combining Kohonen maps with ARIMA time series models to forecast traffic flow. Transp. Res. Part C Emerg. Technol.
**1996**, 4, 307–318. [Google Scholar] [CrossRef][Green Version] - Kamarianakis, Y.; Prastacos, P. Forecasting traffic flow conditions in an urban network: Comparison of multivariate and univariate approaches. Transp. Res. Rec.
**2003**, 1857, 74–84. [Google Scholar] [CrossRef] - Xia, Y.; Chen, J. Traffic flow forecasting method based on gradient boosting decision tree. In Proceedings of the 2017 5th International Conference on Frontiers of Manufacturing Science and Measuring Technology (FMSMT 2017), Taiyuan, China, 24–25 June 2017; Atlantis Press: Paris, France, 2017; pp. 413–416. [Google Scholar]
- Hojdová, M.; Rohovec, J.; Chrastný, V.; Penížek, V.; Navrátil, T. The influence of sample drying procedures on mercury concentrations analyzed in soils. Bull. Environ. Contam. Toxicol.
**2015**, 94, 570–576. [Google Scholar] [CrossRef] [PubMed] - Yang, Z.; Liu, Y. Data Imputation Using Least Squares Support Vector Machines in Urban Arterial Streets. IEEE Signal Process. Lett.
**2009**, 16, 414–417. [Google Scholar] [CrossRef] - Wang, J.; Shi, Q. Short-term traffic speed forecasting hybrid model based on Chaos–Wavelet Analysis-Support Vector Machine theory. Transp. Res. Part C Emerg. Technol.
**2013**, 27, 219–232. [Google Scholar] [CrossRef] - Nadarajan, J.; Sivanraj, R. Attention-Based Multiscale Spatiotemporal Network for Traffic Forecast with Fusion of External Factors. ISPRS Int. J. Geo. Inf.
**2022**, 11, 619. [Google Scholar] [CrossRef] - Feng, F.; Zou, Z.; Liu, C.; Zhou, Q.; Liu, C. Forecast of Short-Term Passenger Flow in Multi-Level Rail Transit Network Based on a Multi-Task Learning Model. Sustainability
**2023**, 15, 3296. [Google Scholar] [CrossRef] - Ma, X.; Tao, Z.; Wang, Y.; Yu, H.; Wang, Y. Long short-term memory neural network for traffic speed prediction using remote microwave sensor data. Transp. Res. Part C Emerg. Technol.
**2015**, 54, 187–197. [Google Scholar] [CrossRef] - Vinayakumar, R.; Soman, K.P.; Poornachandran, P. Applying deep learning approaches for network traffic prediction. In Proceedings of the 2017 International Conference on Advances in Computing, Communications and Informatics (ICACCI), Manipal, India, 13–16 September 2017; IEEE: New York, NY, USA, 2017. [Google Scholar]
- Sutskever, I.; Vinyals, O.; Le, Q.V. Sequence to Sequence Learning with Neural Networks, NIPS; MIT Press: Cambridge, MA, USA, 2014. [Google Scholar]
- Ma, X.; Dai, Z.; He, Z.; Ma, J.; Wang, Y. Learning Traffic as Images: A Deep Convolutional Neural Network for Large-Scale Transportation Network Speed Prediction. Sensors
**2017**, 17, 818. [Google Scholar] [CrossRef][Green Version] - Zheng, H.; Ding, X.; Wang, Y.; Zhao, C. Attention Based Spatial-Temporal Graph Convolutional Networks forRSU Communication Load Forecasting. In Proceedings of the International Conference on Collaborative Computing: Networking, Applications and Worksharing, 17th EAI International Conference, CollaborateCom 2021, Virtual Event, 16–18 October 2021; Springer: Cham, Switzerland, 2021. [Google Scholar]
- Diao, Z.; Wang, X.; Zhang, D.; Liu, Y.; Xie, K.; He, S. Dynamic Spatial-Temporal Graph Convolutional Neural Networks for Traffic Forecasting. In Proceedings of the National Conference on Artificial Intelligence. Association for the Advancement of Artificial Intelligence (AAAI), Honolulu, HI, USA, 29–31 January 2019. [Google Scholar]
- Zhao, L.; Song, Y.; Zhang, C.; Liu, Y.; Wang, P.; Lin, T.; Deng, M.; Li, H. T-GCN: A Temporal Graph Convolutional Network for Traffic Prediction. IEEE Trans. Intell. Transp. Syst.
**2019**, 21, 3848–3858. [Google Scholar] [CrossRef][Green Version] - Wu, Y.; Tan, H.; Qin, L.; Ran, B.; Jiang, Z. A hybrid deep learning based traffic flow prediction method and its understanding. Transp. Res. Part C Emerg. Technol.
**2018**, 90, 166–180. [Google Scholar] [CrossRef] - Ahmed, M.S.; Cook, A.R. Analysis of Freeway Traffic Time-Series Data by Using Box-Jenkins Technique; Transportation Research Board: Washington, DC, USA, 1979. [Google Scholar]
- Cho, K.; Van Merrienboer, B.; Bahdanau, D.; Bengio, Y. On the properties of neural machine translation: Encoder-decoder approaches. arXiv
**2014**, arXiv:1409.1259. [Google Scholar] - Zaremba, W.; Sutskever, I.; Vinyals, O. Recurrent neural network regularization. arXiv
**2014**, arXiv:1409.2329. [Google Scholar]

**Figure 2.**Illustration of the functional and connective characteristics of adjacent functional areas.

**Figure 4.**Inflow forecast results of functional areas at different time steps (one day): (

**a**) forecast 10 min later; (

**b**) forecast 20 min later; (

**c**) forecast 30 min later; and (

**d**) forecast 60 min later.

**Figure 5.**Inflow and outflow heat map of functional areas at different time periods: (

**a**) 6:00 a.m.; (

**b**) 9:00 a.m.; (

**c**) 6:00 p.m.; and (

**d**) 9:00 p.m.

Driver ID | Order ID | Time (s) | Longitude (°) | Latitude (°) |
---|---|---|---|---|

3a7013bfbbdcb48f7f203ed5d30c8e01 | 464b015cf95322f3c07df5abb908f61f | 1475299381 | 104.05892 | 30.65445 |

3a7013bfbbdcb48f7f203ed5d30c8e01 | 464b015cf95322f3c07df5abb908f61f | 1475299399 | 104.0593 | 30.65445 |

3a7013bfbbdcb48f7f203ed5d30c8e01 | 464b015cf95322f3c07df5abb908f61f | 1475299421 | 104.06025 | 30.65443 |

3a7013bfbbdcb48f7f203ed5d30c8e01 | 464b015cf95322f3c07df5abb908f61f | 1475299418 | 104.06025 | 30.65443 |

3a7013bfbbdcb48f7f203ed5d30c8e01 | 464b015cf95322f3c07df5abb908f61f | 1475299406 | 104.05958 | 30.65444 |

**Table 2.**Performance comparison of AG-GCN model and benchmark models for traffic flow prediction at different time steps.

Time | Metric | HA | SVR | GCN | GRU | T-GCN | AG-GCN |
---|---|---|---|---|---|---|---|

10 min | RMSE | 13.0208 | 9.4440 | 32.3747 | 9.3522 | 9.2249 | 8.7973 |

R^{2} | 0.9334 | 0.9649 | 0.5886 | 0.9656 | 0.9662 | 0.9682 | |

MAE | 8.3185 | 6.1532 | 22.0585 | 6.1413 | 6.0517 | 5.6227 | |

20 min | RMSE | 13.3555 | 9.7939 | 32.6978 | 9.7526 | 9.6493 | 9.1283 |

R^{2} | 0.9302 | 0.9625 | 0.5822 | 0.9628 | 0.9632 | 0.9658 | |

MAE | 8.5104 | 6.3675 | 22.3522 | 6.4781 | 6.3464 | 5.8562 | |

30 min | RMSE | 13.6886 | 10.1409 | 33.5245 | 10.1730 | 10.0547 | 9.2414 |

R^{2} | 0.9270 | 0.9600 | 0.5651 | 0.9597 | 0.9598 | 0.9650 | |

MAE | 8.6976 | 6.5857 | 23.7464 | 6.7547 | 6.6394 | 5.9869 | |

60 min | RMSE | 15.0062 | 11.4120 | 34.1213 | 11.4781 | 11.2326 | 9.4452 |

R^{2} | 0.9133 | 0.9498 | 0.5532 | 0.9493 | 0.9497 | 0.9635 | |

MAE | 9.3891 | 7.3613 | 23.3953 | 7.6925 | 7.4977 | 6.1547 |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Liao, Z.; Huang, H.; Zhao, Y.; Liu, Y.; Zhang, G. Analysis and Forecast of Traffic Flow between Urban Functional Areas Based on Ride-Hailing Trajectories. *ISPRS Int. J. Geo-Inf.* **2023**, *12*, 144.
https://doi.org/10.3390/ijgi12040144

**AMA Style**

Liao Z, Huang H, Zhao Y, Liu Y, Zhang G. Analysis and Forecast of Traffic Flow between Urban Functional Areas Based on Ride-Hailing Trajectories. *ISPRS International Journal of Geo-Information*. 2023; 12(4):144.
https://doi.org/10.3390/ijgi12040144

**Chicago/Turabian Style**

Liao, Zhuhua, Haokai Huang, Yijiang Zhao, Yizhi Liu, and Guoqiang Zhang. 2023. "Analysis and Forecast of Traffic Flow between Urban Functional Areas Based on Ride-Hailing Trajectories" *ISPRS International Journal of Geo-Information* 12, no. 4: 144.
https://doi.org/10.3390/ijgi12040144