# Geographically Weighted Flow Cross K-Function for Network-Constrained Flow Data
## 1 Introduction  
Spatial flows are usually used to reflect the movements among different spatial locations, such as human migration [1; 2], daily commuting [3; 4; 5] and tourism travel [6; 7]. Spatial flows can be expressed as origin-destination (OD) flows connecting pairs of endpoints and can be classified as individual flows and aggregated flows based on the spatial form of the endpoints [8]. Individual activities, such as individual home-work commuting [9], are expressed as individual flows, while the movements of groups of geographical objects, such as public transportation spatial flows between different urban subzones [10], are expressed as aggregated flows. In this study, we only focus on individual flows, which can provide more details on movements. Many spatial flow datasets--for example, pedestrian flow datasets and vehicle flow datasets--are constrained by road networks. Network-constrained spatial flow datasets usually contain different types, e.g., yellow taxi flows and green taxi flows [11] and weekday flows and weekend flows [12]. The analysis of the spatial associations between different types of network-constrained flows can facilitate the understanding of the spatial relationships among different movements on a road network. For example, the strong spatial association between weekday flows and weekend flows may reveal entertainment travel, which can provide more information to aid in our understanding of the travel purposes of city residents [12]. Most existing studies focus on detecting the clustering patterns of univariate spatial flows and can be divided into spatial statistical-based [4; 13; 14; 15], hierarchical-based [16; 17; 18], and density-based [19; 20] clustering methods. These methods extend spatial clusteringmethods for points to a flow context by defining spatial flow distance measurement. For example, [PERSON] et al. [4] firstly defined the flow distance between two spatial flows as the sum of the Euclidean distance between their origin points and the Euclidean distance between their destination points. Then, spatial flows were treated as the study objects and nearby spatial flows were searched by the defined flow distance. Finally, the L-Function [21] was extended to quantify the clustering scale of flows. Although existing clustering methods for univariate spatial flows can detect clustering patterns effectively, these methods cannot measure spatial associations between different spatial flow types. In recent years, some bivariate flow pattern mining methods have been developed to measure spatial associations between different spatial flow types. The existing methods mainly extend some statistical metrics for points to a flow context (e.g., Flow Cross K-Function, BiFlowLISA, and flow co-location index) by defining distance measures between two spatial flows [11; 15; 22]. Taking the Flow Cross K-Function as an example, given two different types of spatial flows, A and B, the Flow Cross K-Function uses the number of nearby type B spatial flows of type A as the indicator of the spatial association between type A and type B. The Flow Cross K-Function is comprehensive and effective because this method measures the spatial association not only at the global and local level but also at multiple spatial scales (spatial distance). Moreover, some bivariate flow clustering methods were developed to detect clusters (OD region pairs) of interest comprising two types of spatial flow, e.g., the ratio between the number of type A spatial flows to the number of type B spatial flows in the cluster is abnormally different from the ratio outside the cluster, and both types of flow in the cluster are high-density [23]. Existing bivariate flow pattern mining methods for individual spatial flows usually do not take the effect of distance decay into account, e.g., the Flow Cross K-Function treats closer and farther nearby spatial flows as the same, without considering the distance between the spatial flows and their nearby flows.