Sign in Get 3 free credits

Try a job or a niche: tiktok captions, study notes, excel formulas. Press Esc to close.

Spatial statistics

Always invoke before testing a geographic pattern for clustering, hotspots, dependence, or explanatory regression.

Safety check

  • Not rated by Claude yet. We only sell skills Claude has read and rated 7 out of 10 or higher, so this one is a free link to its author.

An automated scan lowers risk but cannot promise zero risk. How we check skills

Preview

The first lines of SKILL.md
---
name: spatial-statistics
description: >-
  Always invoke before testing a geographic pattern for clustering, hotspots,
  dependence, or explanatory regression, even when aggregation or ordinary
  OLS is proposed as routine. Covers Moran's I, LISA, Getis-Ord Gi*, weights,
  MAUP and scale sensitivity for areas/grids, residual dependence, and
  spatial lag/error/GWR/MGWR models. Use ML standards for predictive
  evaluation and geostatistics for continuous surfaces from sparse samples.
license: MIT
metadata:
  author: Muhammed Enes Duran
---

# Spatial Statistics

Purpose: answer "is it clustered, where, and why" with defensible inference.
The core discipline: spatial data violates independence assumptions, so
standard statistics silently overstate significance — every analysis here
starts with weights design and ends with residual diagnostics.

## Spatial weights (W) — the analysis IS the weights

Every result downstream depends on W; choose it for substantive reasons and
run a sensitivity check with one alternative:

| Weights | Use when |
|---|---|
| Queen/Rook contiguity | Irregular polygons (admin units, parcels) |
| K-nearest neighbors | Points; islands present (contiguity leaves them unconnected) |
| Distance band | Physical process with known range |
| Kernel (distance-decayed) | Smooth influence, GWR-style local models |

```python
from libpysal.weights import Queen

w = Queen.from_dataframe(gdf, use_index=True)
print(f"islands: {w.islands}")   # unconnected units break stats — fix or document
w.transform = "r"                # row-standardize (default for Moran/lag models)
```
...

From muend's repository, MIT licence.

Related skills

  • Checked

    JUnit and Mockito tests

    Writes and fixes Java tests with JUnit, AssertJ and Mockito that are deterministic and keep failures visible.

    by github 42k
    8/101 credit
  • Checked

    Test code review

    Reviews new or changed tests in pytest, Jest, Go and more, so weak tests are caught before merge.

    by amElnagdy 1.3k
    7/101 credit
  • Checked

    Go table driven tests

    Writes Go tests with table cases, fakes, fuzzing, benchmarks and golden files that stay fast and reliable.

    by ericrisco 691
    8/101 credit
  • Checked

    MSTest Unit Testing

    Writes modern C# unit tests with current MSTest APIs, assertions, data driven tests and lifecycle patterns.

    by github 42k
    8/101 credit
  • Checked

    Quarkus Testing

    Writes and fixes Quarkus tests using Dev Services containers, with the right profiles, mocks and run commands.

    by github 42k
    7/101 credit
  • Checked

    Dotnet Test Hot Reload

    Sets up a live .NET test host that reruns your tests automatically each time you edit the code.

    by dotnet 6.4k
    7/101 credit

Secure checkout

Credits

AUD

  1. 1Choose
  2. 2Pay on Square
  3. 3Credits added