API
SpatialDependence.assignments — Methodassignments(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
SpatialDependence.assignments — Methodassignments(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.
SpatialDependence.bounds — Functionbounds(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.
SpatialDependence.cardinalities — Methodcardinalities(W::SpatialWeights)Return a vector with the number of neighbors of each observation.
SpatialDependence.centroid — Functioncentroid(P)Calculate the centroid of a polygon or vector of polygons $P$.
SpatialDependence.dnearneigh — Methoddnearneigh(A; threshold)Build a spatial weights object from a table A that constains a points geometry column using a distance threshold.
SpatialDependence.dnearneigh — Methoddnearneigh(X, Y; threshold)Build a spatial weights object from a set of coordinates using a distance threshold.
SpatialDependence.dnearneigh — Methoddnearneigh(P; threshold)Build a spatial weights object from a vector of points using a distance threshold.
SpatialDependence.geary — Methodgeary(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.
SpatialDependence.getisord — Methodgetisord(x, W)Compute the Getis-Ord statistic.
Optional Arguments
star=true: compute the Gi* statistic, or the Gi if set tofalse.permutations=9999: number of permutations for the randomization test.rng=default_rng(): random number generator for the randomization test.
SpatialDependence.islands — Methodislands (W::SpatialWeights)Return a vector with the islands in the spatial weights object.
SpatialDependence.issignificant — Methodissignificant(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
SpatialDependence.knearneigh — Methodknearneigh(A; k)Build a spatial weights object from a table A that constains a points geometry column using $k$ nearest neighbors..
SpatialDependence.knearneigh — Methodknearneigh(X, Y; k)Build a spatial weights object from a set of coordinates using k nearest neighbors.
SpatialDependence.knearneigh — Methodknearneigh(P; k)Build a spatial weights object from a vector of points using $k$ nearest neighbors.
SpatialDependence.level — Functionlevels(mc::AbstractMapClassification)Get the levels of the classes.
levels(mc)[k] is the level of the $k$-class.
SpatialDependence.localgeary — Methodlocalgeary(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:moranscatterplot.
SpatialDependence.localmoran — Methodlocalmoran(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$.
SpatialDependence.mapclassify — Functionmapclassify (mcr::AbstractMapClassificator, x::Vector)Classify observations in variable x in classess using the criterion specified in mcr.
SpatialDependence.maplabels — Functionmaplabels (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.
SpatialDependence.meancenter — Functionmeancenter(P)Calculate the mean center of a polygon or vector of polygons $P$.
SpatialDependence.moran — Methodmoran(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.
SpatialDependence.neighbors — Methodneighbors(W::SpatialWeights, i::Int)Return a vector with the neighbors of $i$.
SpatialDependence.nislands — Methodnislands (W::SpatialWeights)Return the number of islands in the spatial weights object.
SpatialDependence.polyneigh — Methodpolyneigh(A, criterion = :Queen)Build a spatial weights object from table A that contains a geometry column.
Optional Arguments
criterion=:Queen: neighbour criterion.:Queenor:Rook.tol=0.0: tolerance for polygon contiguity.
SpatialDependence.polyneigh — Methodpolyneigh(P, criterion = :Queen)Build a spatial weights object from a vector of polygons P.
Optional Arguments
criterion=:Queen: neighbour criterion.:Queenor:Rook.tol=0.0: tolerance for polygon contiguity.
SpatialDependence.reggeomlattice — Methodreggeomlattice(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.
SpatialDependence.slag — Methodslag(W, x)Calculate the spatial lag of x using the spatial weights W.
SpatialDependence.wtransform! — Methodwtransform!(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.
SpatialDependence.wtransform — Methodwtransform(W::SpatialWeights, style::Symbol)Returns a transformed copy of the weights matrix.
SpatialDependence.wtransformation — Methodwtransformation (W::SpatialWeights)Return the current transformation of the spatial weights.
StatsAPI.weights — Methodweights(W::SpatialWeights, i::Int)Return a vector with the weights of the neighbors of $i$.
StatsBase.counts — Methodcounts(mc::AbstractMapClassification)Get the vector of classess sizes.
counts(mc)[k] is the number of observations assigned to the $k$-class.