Global Moran's I + DBSCAN summary on TPS lat/long event data
Source:R/mrm_tps.R
mrm_tps_moran_clustering.RdGrids the lat/long extent of data into a coarse raster of
grid_resolution cells, counts events per cell, and computes the
global Moran's I via a rook contiguity matrix. Also runs DBSCAN on
the raw lat/long points (rescaled to km) and reports cluster
counts.
Usage
mrm_tps_moran_clustering(
data,
lat_col = "LAT_WGS84",
lon_col = "LONG_WGS84",
grid_resolution = 40L,
dbscan_eps = 0.3,
dbscan_minpts = 5L
)Details
This function is a thin computational wrapper. For high-precision
computations on full-sized TPS files use the morie Python
tps_spatial_advanced pipeline; the R version is for quick
interactive auditing.
Examples
if (FALSE) {
tps <- read.csv("Assault_Open_Data.csv")
mrm_tps_moran_clustering(tps)
}