Lattice Data with R (Cape Town)

In this exercise, we explore the concepts and applications of spatial autocorrelation (Is their a relationship between attributes and their location? Do similar attributes cluster? Is their an underlying (spatial) pattern in the data?).

Fig.1 - Residential crime (theft and burglary) per suburb (Cape Town, South Africa)

The aim is to equip a user with the skills to understand and test the connections and relationship between lattice data with such methods as Global and Local Morans as-well-as extending ordinary least squares regression to accommodate location; namely geographically weighted regression.

We traverse such technics as:

   1) Spatial Autocorrelation
      a. Neighbors and Weight Matrices
      b. Moran’s I, along with its Monte-Carlo derivative, test for spatial autocorrelation
      c. Moran’s scatter plot and correlogram
      d. Local Indicators of Spatial Autocorrelation (LISA)
   3) Ordinary Least Squares (OLS) Regression and Geographically Weighted Regresssion (GWR)
   4) we also briefly highlight ways we can interrogate the quality of a GWR with;
      a. three spgwr significance tests

For this assignment we use a dataset that is well-suited to illustrate these concepts. A lattice dataset containing such variables such as: residential theft and burglaries (SAPS SA), median property valuation (City of Cape Town Open Data), median income and number Bachelor degrees (STATSSA), among other variables, of suburbs within the City of Cape Town; South Africa. The dataset is discussed in The Dataset.