User-friendly thresholded subspace-constrained mean shift for geospatial data

DREDGE is a tool for density ridge estimation using an extended version of the subspace-constrained mean shift (SCMS) algorithm, modified for geospatial data and hot spot analysis. Put simply, it allows for the extraction of ridges in datasets of coordinates that represent paths optimally following the data distribution. Based on the initial introduction of the SCMS algorithm, it features modifications like thresholding that were subsequently developed for applications in cosmology.

Given a set of latitude-longitude pairs, DREDGE can be used to extract these ridges in order to recover filamentary structures underlying the data distribution. While further customization is possible, the tool only requires these coordinates as mandatory inputs, and also features an internal criterion to automatically infer convergence of the algorithm. DREDGE is introduced in our paper on patrol optimization and hot spot analysis in the area of quantitative criminology. In the figure above, ridges for reported Part I crime incidents in the City of Chicago are plotted for the year 2018.

Since DREDGE is on PyPI, simply type pip install dredge in your terminal to install it. This project was developed for Python 3, and the installation process will automatically install any necessary dependencies. Documentation and a quickstart guide on how to use DREDGE can be found in the code repository as well as the source code’s docstrings.