Compute Local Geary's C
local_gearys(shp, adj, wts, spatial_mat, epsg = 3857)
sf data frame. Optional if adj or spatial_mat provided.
zero indexed adjacency list. Optional if shp or spatial_mat provided.
Required. Numeric vector with weights to use for Moran's I.
matrix of spatial weights. Not required if shp or adj provided.
numeric EPSG code to planarize to. Default is 3857.
numeric vector
library(dplyr)
data('checkerboard')
checkerboard <- checkerboard |> mutate(m = as.numeric((id + i) %% 2 == 0))
local_gearys(shp = checkerboard, wts = checkerboard$m)
#> Warning: Planarizing skipped. `x` missing CRS.
#> # A tibble: 64 × 1
#> geary
#> <dbl>
#> 1 8
#> 2 12
#> 3 12
#> 4 12
#> 5 12
#> 6 12
#> 7 12
#> 8 8
#> 9 12
#> 10 16
#> # ℹ 54 more rows