> For the complete documentation index, see [llms.txt](https://xunli.gitbook.io/postgeoda/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xunli.gitbook.io/postgeoda/2.-spatial-weights.md).

# 2. 🌐 Spatial Weights

Spatial weights represent the possible spatial interaction between observations in space. They are an essential element in the construction of spatial autocorrelation statistics and provide the means to create spatially explicit variables, such as spatially lagged variables and spatially smoothed rates. For more information, please read: <https://geodacenter.github.io/workbook/4a_contig_weights/lab4a.html>

&#x20;**CONTENTS**

* 2.1 Contiguity-Based Weights
  * queen\_weights()
  * rook\_weights()
  * weights\_astext()
* 2.2 Distance-Based Weights
  * distance\_weights()
  * min\_distthreshold()
  * knn\_weights()
* 2.3 Kernel Weights
  * kernel\_weights()
  * kernel\_knnweights()
