API

SpatialDependence.assignments — Method
assignments(x, α, adjust = :none)

Return a vector with the categories assigned by the local statistic with a significance threshold $α$.

p-values can be adjusted with the adjust parameter using the Bonferroni correction :bonferroni or controlling for the False Discovery Rate, :fdr

source
SpatialDependence.assignments — Method
assignments(mc::AbstractMapClassification)

Get the vector of classes indices for each observation.

assignments(mc)[i] is the index of the class to which the $i$-th observation is assigned.

source
SpatialDependence.bounds — Function
bounds(mc::AbstractMapClassification)

Get the lower and upper bounds of the classes.

bounds(mc)[1][k] is the lower bound of the $k$-class.

bounds(mc)[2][k] is the upper bound of the $k$-class.

source
SpatialDependence.dnearneigh — Method
dnearneigh(A; threshold)

Build a spatial weights object from a table A that constains a points geometry column using a distance threshold.

source
SpatialDependence.geary — Method
geary(x, W)

Compute the Geary's c test of global spatial autocorrelation.

Optional Arguments

  • permutations=9999: number of permutations for the randomization test.
  • rng=default_rng(): random number generator for the randomization test.
source
SpatialDependence.getisord — Method
getisord(x, W)

Compute the Getis-Ord statistic.

Optional Arguments

  • star=true: compute the Gi* statistic, or the Gi if set to false.
  • permutations=9999: number of permutations for the randomization test.
  • rng=default_rng(): random number generator for the randomization test.
source
SpatialDependence.issignificant — Method
issignificant(x, α, adjust = :none)

Return a vector of boolean values indicating if the local statistics are significant or not at the desired threshold $α$.

p-values can be adjusted with the adjust parameter using the Bonferroni correction :bonferroni or controlling for the False Discovery Rate, :fdr

source
SpatialDependence.knearneigh — Method
knearneigh(A; k)

Build a spatial weights object from a table A that constains a points geometry column using $k$ nearest neighbors..

source
SpatialDependence.level — Function
levels(mc::AbstractMapClassification)

Get the levels of the classes.

levels(mc)[k] is the level of the $k$-class.

source
SpatialDependence.localgeary — Method
localgeary(x, W)

Compute the Local Geary test of spatial autocorrelation.

Optional Arguments

  • permutations=9999: number of permutations for the randomization test.
  • rng=default_rng(): random number generator for the randomization test.
  • corrected=true: divide the scaling factor by $n-1$ instead of $n$.
  • categories=:positivenegative: assing observations to positive or negative spatial autocorrelation, or in combination with the :moran scatterplot.
source
SpatialDependence.localmoran — Method
localmoran(x, W)

Compute the Local Moran test of spatial autocorrelation.

Optional Arguments

  • permutations=9999: number of permutations for the randomization test.
  • rng=default_rng(): random number generator for the randomization test.
  • corrected=true: divide the scaling factor by $n-1$ instead of $n$.
source
SpatialDependence.mapclassify — Function
mapclassify (mcr::AbstractMapClassificator, x::Vector)

Classify observations in variable x in classess using the criterion specified in mcr.

source
SpatialDependence.maplabels — Function
maplabels (mcAbstractMapClassification)

Get the labels of the classification mc.

Optional Arguments

  • digits=2: number of decimal digits.
  • sep=", ": separator between class lower and upper bounds.
  • counts=true: include the total number of observations on each class.
source
SpatialDependence.moran — Method
moran(x, W)

Compute the Moran's I test of global spatial autocorrelation.

Optional Arguments

  • permutations=9999: number of permutations for the randomization test.
  • rng=default_rng(): random number generator for the randomization test.
source
SpatialDependence.polyneigh — Method
polyneigh(A, criterion = :Queen)

Build a spatial weights object from table A that contains a geometry column.

Optional Arguments

  • criterion=:Queen: neighbour criterion. :Queen or :Rook.
  • tol=0.0: tolerance for polygon contiguity.
source
SpatialDependence.polyneigh — Method
polyneigh(P, criterion = :Queen)

Build a spatial weights object from a vector of polygons P.

Optional Arguments

  • criterion=:Queen: neighbour criterion. :Queen or :Rook.
  • tol=0.0: tolerance for polygon contiguity.
source
SpatialDependence.reggeomlattice — Method
reggeomlattice(n, m)

Create a regular geometry-lattice of $n$ rows and $m$ columns.

Optional Arguments

  • gtype=:polygon: geometry. :polygon or :point.
  • direction=:rightdown: direction. :rightup, :rightdown, :leftdown or :leftup.
source
SpatialDependence.wtransform! — Method
wtransform!(W::SpatialWeights, style::Symbol)

In-place transformation of the weights using the specified $style$.

Weights transformation

style can be one of the following:

  • :binary: 1 if neighbor, 0 if not.
  • :row: row-standardized. Each row sum equals one.
source
StatsAPI.weights — Method
weights(W::SpatialWeights, i::Int)

Return a vector with the weights of the neighbors of $i$.

source
StatsBase.counts — Method
counts(mc::AbstractMapClassification)

Get the vector of classess sizes.

counts(mc)[k] is the number of observations assigned to the $k$-class.

source