## 3 Data Processing and Methodology
### Graph Transformation  
The graph transformation process involves creating a graph representation using the 'from node' and 'to node' attributes of the road links. This allows for modeling traffic flow and connectivity between different parts of the road network. Additionally, the data were structured to generate image data, which were based on the properties of the road links and included a time index. These image and graph data representations played a crucial role in capturing the spatio-temporal patterns in the data and were integral to training the STGCN and CNN models. In this study, generating graphs was a fundamental step in representing the essential dimensions of speed, time, and space for training STGCN, a GCN-based model. GCN-based models rely on graph data for their training and analysis. To create these graph data, we employed a method in which the average value of point data sharing the same link index was assigned as the node value within the graph. The connection information for each link was designated as the edge information of the graph. The outcome of this process was a graph representation of spatio-temporal attributes. Figure 4 visually depicts how graph data were defined for model training. Several considerations exist regarding the number of links and other parameters in our graph transformation process. One limitation is that an excessive number of links can increase the computational complexity and memory usage, potentially impacting model performance and training time. Conversely, too few links might result in an oversimplified graph that fails to capture the necessary details of the road network. Therefore, in this study's experiments, we used link data located on main roads in urban areas, where appropriate traffic volume could be collected. Other important parameters include temporal resolution, which impacts the granularity of the temporal patterns captured and may require more computational resources at higher resolutions and feature selection, where the properties of road links, such as traffic speed, TSR, and brake data, must be carefully chosen to accurately reflect the road network environment and driver intentions. Therefore, this study conducted experiments reflecting various time resolutions, such as 60, 70, 80, and 90 min, and selected data on speed, TSR, and brake information to reflect the road environment and the driver's intentions. Figure 3: Spatial join between the road link and taxi location information. Each node within the graph was determined by aggregating and averaging the point data over a 10 min window for a given link index. The averaged data served as the feature matrix for STGCN operation. The edges of the graph contained connection information for every node. This connection information was utilized to create an adjacency matrix, which was employed to update the state of each node in a manner consistent with the Laplacian matrix. These graph-based representations were essential for training the GCN-based models as they effectively encapsulated the dynamics and relationships of the network. Additionally, this study also transformed the data into images utilized in CNN models. This conversion process bears similarities to the generation of graph data. The images were structured along two axes: time and node index. Figure 5 illustrates the nature of these converted images from brake and TSR information. For example, the X-axis indicates time (min), whereas the Y-axis indicates node index. The color of the images indicates the value of brake and TSR. This research applied a dual approach, creating graph data for GCN-based model learning and image data for CNN-based model learning. These representations were derived from the same dataset but catered to different deep learning models. The graph data captured the dynamics and connectivity of the network.