API reference

A-DBSCAN

adbscan.ADBSCAN(eps, min_samples[, ...])

A-DBSCAN, as introduced in [Arribas-Bel et al., 2021].

Correlogram

correlogram(geometry, variable[, support, ...])

Generate a spatial correlogram

Gamma Statistic

Gamma(y, w[, operation, standardize, ...])

Gamma index for spatial autocorrelation

Geary Statistics

Geary(y, w[, transformation, permutations])

Global Geary C Autocorrelation statistic

Geary_Local([connectivity, labels, sig, ...])

Local Geary - Univariate

Geary_Local_MV([connectivity, permutations, ...])

Local Geary - Multivariate

Getis-Ord Statistics

G(y, w[, permutations])

Global G Autocorrelation Statistic

G_Local(y, w[, transform, permutations, ...])

Generalized Local G Autocorrelation

Inspection plots

LocalCrossPlot([connectivity, permuations, ...])

Combine local statistics into a G-I-LOSH cross plot.

Join Count Statistics

Join_Counts(y, w[, permutations, drop_islands])

Binary Join Counts

Join Count Local Statistics

Join_Counts_Local([connectivity, ...])

Univariate Local Join Count Statistic

Join_Counts_Local_BV([connectivity, ...])

Univariate Local Join Count Statistic

Join_Counts_Local_MV([connectivity, ...])

Multivariate Local Join Count Statistic

LOSH Statistics

LOSH([connectivity, inference])

Local spatial heteroscedasticity (LOSH)

Map Comparison

areal_entropy([polygons, areas, local, base])

Compute the entropy of the distribution of polygon areas.

completeness(a, b[, local, base])

The completeness of the partitions of polygons in a to those in b.

external_entropy(a, b[, balance, base])

The harmonic mean summarizing the overlay entropy of two sets of polygons: a onto b and b onto a.

homogeneity(a, b[, local, base])

The homogeneity of polygons from a partitioned by b.

overlay_entropy(a, b[, standardize, local, base])

The entropy of how n zones in a are split by m partitions in b, where n is the number of polygons in a and m is the number of partitions in b.

Mixture Smoothing

NP_Mixture_Smoother(e, b[, k, acc, numiter, ...])

Empirical Bayesian Rate Smoother Using Mixture Prior Distributions It goes through 1) defining an initial set of subpopulations, 2) VEM algorithm to determine the number of major subpopulations, 3) EM algorithm, 4) combining simialr subpopulations, and 5) estimating EB rates from a mixture of prior distributions from subpopulation models.

Modifiable Areal Unit Tests

Smaup(n, k, rho)

S-maup: Statistical Test to Measure the Sensitivity to the Modifiable Areal Unit Problem.

Moran Statistics

Moran(y, w[, transformation, permutations, ...])

Moran's I Global Autocorrelation Statistic

Moran_BV(x, y, w[, transformation, permutations])

Bivariate Moran's I

Moran_BV_matrix(variables, w[, ...])

Bivariate Moran Matrix

Moran_Local(y, w[, transformation, ...])

Local Moran Statistics.

Moran_Local_BV(x, y, w[, transformation, ...])

Bivariate Local Moran Statistics.

Moran_Rate(e, b, w[, adjusted, ...])

Adjusted Moran's I Global Autocorrelation Statistic for Rate Variables [Assuncao and Reis, 1999]

Moran_Local_Rate(e, b, w[, adjusted, ...])

Adjusted Local Moran Statistics for Rate Variables [Assuncao and Reis, 1999].

plot_moran_facet(moran_matrix[, figsize, ...])

Moran Facet visualization.

MoranLocalPartial([permutations, ...])

Compute the Multivariable Local Moran statistics under partial dependence [Wolf, 2024]

MoranLocalConditional([permutations, ...])

Fit a local moran statistic for y after regressing out the effects of confounding X on y.

Shape Statistics

shape.boundary_amplitude(collection)

The boundary amplitude (adapted from Wang & Huang (2012)) is the length of the boundary of the convex hull divided by the length of the boundary of the original shape.

shape.convex_hull_ratio(collection)

ratio of the area of the convex hull to the area of the shape itself

shape.diameter_ratio(collection[, rotated])

The Flaherty & Crumplin (1992) length-width measure, stated as measure LW_7 in [Altman, 1998].

shape.equivalent_rectangular_index(collection)

Deviation of a polygon from an equivalent rectangle

shape.form_factor(collection, height)

Computes volumetric compactness

shape.isoareal_quotient(collection)

The Isoareal quotient, defined as the ratio of a polygon's perimeter to the perimeter of the equi-areal circle.

shape.isoperimetric_quotient(collection)

The Isoperimetric quotient, defined as the ratio of a polygon's area to the area of the equi-perimeter circle.

shape.length_width_diff(collection)

The Eig & Seitzinger (1981) shape measure, defined as:

shape.minimum_bounding_circle_ratio(collection)

The Reock compactness measure, defined by the ratio of areas between the minimum bounding/containing circle of a shape and the shape itself.

shape.moa_ratio(collection)

Computes the ratio of the second moment of area (like Li et al (2013)) to the moment of area of a circle with the same perimeter.

shape.moment_of_inertia(collection[, ...])

Compute moment of inertia (second moment of area) per geometry.

shape.moment_of_inertia_global(collection[, ...])

Compute moment of inertia (second moment of area) for an entire collection of geometries combined.

shape.moment_of_inertia_regions(collection)

Compute weighted moment of inertia per region.

shape.nmi(collection)

Computes the normalized moment of inertia

shape.radii_ratio(collection)

The Flaherty & Crumplin (1992) index, OS_3 in [Altman, 1998].

shape.rectangularity(collection)

Ratio of the area of the shape to the area of its minimum bounding rotated rectangle

shape.reflexive_angle_ratio(collection)

The Taylor reflexive angle index, measure OS_4 in [Altman, 1998]

shape.second_areal_moment(collection)

shape.second_moment_of_area(collection[, ...])

Compute moment of inertia (second moment of area) per geometry.

shape.shape_index(collection)

Schumm’s shape index (Schumm (1956) in MacEachren 1985)

shape.squareness(collection)

Measures how different is a given shape from an equi-areal square

Silhouette Statistics

boundary_silhouette(data, labels, W[, ...])

Compute the observation-level boundary silhouette score [Wolf et al., 2019].

path_silhouette(data, labels, W[, D, ...])

Compute a path silhouette for all observations [Rousseeuw, 1987, Wolf et al., 2019].

silhouettes.nearest_label(data, labels[, ...])

Find the nearest label in attribute space.

silhouettes.silhouette_alist(data, labels, alist)

Compute the silhouette for each edge in an adjacency graph.

Spatial Pearson Statistics

Spatial_Pearson([connectivity, permutations])

Global Spatial Pearson Statistic

Spatial_Pearson_Local([connectivity, ...])

Local Spatial Pearson Statistic

Topology

isolation(X, coordinates[, metric, middle, ...])

Compute the isolation of each value of X by constructing the distance to the nearest higher value in the data.

prominence(X, connectivity[, return_all, ...])

Return the prominence of peaks in input, given a connectivity matrix.

Utility Functions

fdr(pvalues[, alpha])

Calculate the p-value cut-off to control for the false discovery rate (FDR) for multiple testing.