GeoTree: a data structure for constant time geospatial search enabling a real-time mix-adjusted median property price index
A common problem appearing across the field of data science is k-NN (k-nearest neighbours), particularly within the context of Geographic Information Systems. In this article, we present a novel data structure, the GeoTree, which holds a collection of geohashes (string encodings of GPS co-ordinates). This enables a constant O(1) time search algorithm that returns a set of geohashes surrounding a given geohash in the GeoTree, representing the approximate k-nearest neighbours of that geohash. Furthermore, the GeoTree data structure retains O(n) memory requirement. We apply the data structure to a property price index algorithm focused on price comparison with historical neighbouring sales, demonstrating an enhanced performance. The results show that this data structure allows for the development of a real-time property price index, and can be scaled to larger datasets with ease.
READ FULL TEXT