# Geographically Weighted Flow Cross K-Function for Network-Constrained Flow Data
## 3 Experiments Using Simulated Datasets  
Three simulated datasets were generated from a real road network of Xiamen Island to test the performance of the proposed method. In simulated dataset 1, we generated 500 type A spatial flows and 1200 type B spatial flows, which were randomly located on the road network (Figure 1a). There was no predefined spatial association between type A and type B in the simulated dataset 1. In simulated dataset 2, we generated 1200 type B spatial flows that were randomly located on the road network, and generated a nearby type A spatial flow for each of the 500 randomly selected type B spatial flows (Figure 1b). We expected that there would exist a spatial association in simulated dataset 2 because there was a type B spatial flow near each type A spatial flow. In simulated dataset 3, we generated three spatial flow clusters with a smaller spatial range for type A (each cluster contained 100 spatial flows) and three spatial flow clusters with a larger spatial range for type B (each cluster contained 300 spatial flows). As shown in Figure 1c, each spatial flow cluster of type A was located inside each spatial flow cluster of type B. The spatial association betweentype A and type B was weak in simulated dataset 3 because each spatial flow and its nearby spatial flows tended to have the same type. The number of Monte Carlo simulations was set to 999, and the significance level \(\alpha\) was set to 0.05. Ten network-constrained scales (ranging from 50 m to 500 m with step size 50 m) were selected for the simulated datasets. Figure 2 shows the results of the global Geographically Weighted Flow Cross K-Function. The confidence envelopes in each figure are represented as grey areas, which were calculated using the Monte Carlo simulation method. Figure 2a,b show the results of simulated dataset 1. The values of \(GWFK_{A,B}(r)\) and \(GWFK_{B,A}(r)\) are within the grey area, which means that there is no spatial association between type A and B. The results of simulated dataset 2 are displayed in Figure 2c,d. The values of \(GWFK_{A,B}(r)\) and \(GWFK_{B,A}(r)\) are above the upper envelopes across all the scales, indicating that type A and type B are spatially associated with each other. Figure 2e,f show the results of simulated dataset 3. The values of \(GWFK_{A,B}(r)\) are lower than the lower envelope, which means that there exists no spatial association between type A and type B. As shown in the figure, only the scale is very large; the values of \(GWFK_{B,A}(r)\) are above the upper envelopes. As we can see, the results are consistent with the predefined pattern, which proves the performance of the global Geographically Weighted Flow Cross K-Function. Figure 1: Spatial distribution of simulated datasets: (**a**) simulated dataset 1; (**b**) simulated dataset 2; (**c**) simulated dataset 3. Figure 2: \(Cont\). The local Geographically Weighted Flow Cross K-Function was also applied to the simulated datasets. For simulated datasets 1 and 2, all the local results suggest no spatial flows that exhibit spatial associations with nearby flows. For simulated dataset 3, only some type B flows, which are closer to type A flows, are detected as flows that exhibit spatial associations with nearby type A flows. The number of detected type B flows increases as the scale increases. Figure 3 shows the detected type B flows at scales of 50 m, 150 m, and 300 m. There are no type A flows detected because type A flows are densely distributed. To further test the performance of the proposed method, three methods--the Flow Cross K-Function (_FK_), Geographically Weighted Flow Cross K-Function (_PWKF_), and Network-Constrained Flow Cross K-Function (_NFK_)--were also applied to simulated dataset 3. The number of Monte Carlo simulations was set to 999, and the significance level \(\alpha\) was set to 0.05. Ten network-constrained scales (ranging from 50 m to 500 m with step size 50 m) were selected for the _NFK_, whereas ten planar scales (ranging from 50 m to 500 m with step size 50 m) were selected for the _NFK_.