/NearRepeat

NearRepeat

Primary LanguageJupyter NotebookMIT LicenseMIT

NearRepeat

Python code to perform analysis of space-time clustering within event data, primarily for application to crime data. Currently limited to an implementation of the Knox test for spatio-temporal association, equivalent to that implemented in Jerry Ratcliffe's Near Repeat Calculator.

One of the advantages of this implementation is that it is fairly fast - in applications to benchmark crime datasets, runtimes are lower than alternative implementations by some margin. Examples of this are included in the notebook below.

A number of notebooks are provided to demonstrate the implementation:

In parallel with the development of the code here, Wouter Steenbeek has developed an alternative implementation in R, which can be found here. We have collaborated on some of the accompanying materials and reviewed each other's code, and as far as we are aware the two implementations should give identical results.