# Local Geary

Local geary is a type of LISA that focuses on squared differences/dissimilarity. A small value of the local geary statistics suggests positive spatial autocorrelation, whereas large values suggest negative spatial autocorrelation. For more details, please read: <http://geodacenter.github.io/workbook/6b_local_adv/lab6b.html#local-geary>

## localGeary()

```sql
function localGeary(
    WeightResult w,
    Array val,
    Number permutations, 
    String permutation_method,
    NUmber significance_cutoff, 
    Number seed)
```

### Arguments

| Name                 | Type           | Description                                                                                                |
| -------------------- | -------------- | ---------------------------------------------------------------------------------------------------------- |
| w                    | *WeightResult* | the WeightResult object created from weights function                                                      |
| val                  | Array          | the values of a selected variable                                                                          |
| permutations         | Number         | the number of permutations for the LISA computation. Default: 999.                                         |
| permutation\_method  | String         | the permutation method used for the LISA computation. Options are 'complete', 'lookup'. Default: 'lookup'. |
| significance\_cutoff | Number         | the cutoff value for significance p-values to filter not-significant clusters. Default: 0.05.              |
| seed                 | Number         | the seed for random number generator used in LISA statistics. Default: 123456789.                          |

### Return

| Type       | Description                                                                                                                  |
| ---------- | ---------------------------------------------------------------------------------------------------------------------------- |
| LisaResult | The LisaResult object contains the results of LISA computation: *pvalues, clusters, lisa\_values, neighbors, labels, colors* |

**Try it yourself in the playground (jsgeoda + deck.gl):**

{% embed url="<https://codesandbox.io/s/5lisaunivariate-zhhop>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xunli.gitbook.io/jsgeoda/local-spatial-autocorrelation/local-geary.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
