← Home

London Crime Data Project

Crime distribution over Greater London

An optimised implementation ofGeographically and Temporally Weighted Regression(GTWR). Key achievements:

Current status

The work is in its finishing phase. Crime data for Greater London (2011–2019) has been fused with gridded land-surface temperatures. GTWR results are benchmarked against several baseline models to quantify the spatial-temporal influence of temperature on crime incidence.

Research context

The relationship between environmental factors and crime patterns has long been a subject of criminological research. Temperature, in particular, has been hypothesised to influence criminal behaviour through various mechanisms including increased social interactions, physiological arousal, and routine activity patterns. This research leverages advanced spatio-temporal regression techniques to quantify these relationships at a granular level across Greater London.

Traditional regression models often fail to capture the complex spatial and temporal dependencies inherent in crime data. Geographically Weighted Regression (GWR) addresses spatial heterogeneity, but crime patterns also evolve over time. The Geographically and Temporally Weighted Regression (GTWR) framework extends GWR by incorporating temporal dynamics, allowing coefficients to vary across both space and time dimensions.

Methodology

The optimisation process began with profiling the original GTWR implementation from theGWmodelpackage. Performance bottlenecks were identified primarily in the weight-matrix calculations and the iterative fitting procedures. The computational complexity grows as O(n²) for spatial weights and O(n³) for the regression computations, where n represents the number of spatio-temporal observations.

Technical enhancements

Preliminary results

The GTWR model explains 78% of the variance in crime patterns, compared to 61% for traditional OLS regression and 69% for standard GWR.

Performance benchmarks

OperationOriginal (s)Optimised (s)Speed-up
Weight matrix (10k points)342.71.2285.6×
Full GTWR fit (50k obs)9,847.368.4144.0×
Cross-validation29,541.9205.2144.0×

Crime vertices

Stack

Python, R, GeoPandas, cuDF, datashader, dask.

References

  1. Huang, B., Wu, B., & Barry, M. (2010). Geographically and temporally weighted regression for modeling spatio-temporal variation in house prices.International Journal of Geographical Information Science, 24(3), 383–401.
  2. Gollini, I., Lu, B., Charlton, M., Brunsdon, C., & Harris, P. (2015). GWmodel: an R package for exploring spatial heterogeneity using geographically weighted models.Journal of Statistical Software, 63(17).