Spatial autocorrelation (pt. 2)

Spatial autocorrelation activity

Use GeoDa to complete the following tasks.

  1. Using the Nepal Aid example dataset, find the variable “Percentage without Safe Water”
    • Create a boxplot
    • Create a histogram
  2. Create at least three weights matrices. Use
  • One contiguity-based matrix
  • One distance-based (knn)
  • One distance-based (distance band)
  1. Compute SAC using Moran’s I and compare results

Using R to compute SAC

library(sf)
library(haffutils)

## read data
wi_hazards <- _____("https://gitlab.com/mhaffner/data/-/raw/master/wi_hazards.geojson")

## use the moran_test function to compute morans i on flood_evt at several
## different bandwidths

## use the moran_iter function to automate it

## compare iterations of flod_evt to torn_evt; which has more SAC?