pygeoda API reference

pygeoda (I/O)

pygeoda.open(data_source)

Create a geoda object by reading a spatial dataset: either ESRI Shapefile or GeoPandas object.

pygeoda.geoda(gda_obj)

A wrapper class of GeoDa class from libgeoda created from ESRI Shapefile

pygeoda.weights

pygeoda.Weight(gda_w)

GeoDa Weight class

pygeoda.queen_weights(geoda_obj, **kwargs)

Queen Contiguity Spatial Weights Create a Queen contiguity weights with options of “order”, “include lower order” and “precision threshold”

pygeoda.rook_weights(geoda_obj, **kwargs)

Rook Contiguity Spatial Weights Create a Rook contiguity weights with options of “order”, “include lower order” and “precision threshold”

pygeoda.min_distthreshold(geoda_obj[, …])

Minimum Distance Threshold for Distance-based Weights Get minimum threshold of distance that makes sure each observation has at least one neighbor

pygeoda.distance_weights(geoda_obj, …)

Distance-based Spatial Weights Create a distance-based weights

pygeoda.knn_weights(geoda_obj, k, **kwargs)

K-Nearest Neighbors-based Spatial Weights Create a k-nearest neighbors based spatial weights

pygeoda.kernel_weights(geoda_obj, bandwidth, …)

Distance-based Kernel Spatial Weights Create a kernel weights by specifying a bandwidth and a kernel method

pygeoda.kernel_knn_weights(geoda_obj, k, …)

K-NN Kernel Spatial Weights Create a kernel weights by specifying k-nearest neighbors and a kernel method

pygeoda (LISA)

pygeoda.lisa(lisa_obj)

A LISA class wrappers the results of LISA computation

pygeoda.local_moran(w, data, **kwargs)

Local Moran statistics.

pygeoda.local_bimoran(w, data1, data2, **kwargs)

Bivariate local Moran statistics.

pygeoda.local_geary(w, data, **kwargs)

Local Geary Statistics

pygeoda.local_multigeary(w, data, **kwargs)

Local Multivariate Geary Statistics

pygeoda.local_joincount(w, data, **kwargs)

Local Join Count Statistics

pygeoda.local_bijoincount(w, data, **kwargs)

Bivariate Local Join Count Statistics

pygeoda.local_multijoincount(w, data, **kwargs)

(Multivariate) Colocation Local Join Count Statistics

pygeoda.local_g(w, data, **kwargs)

Local Getis-Ord’s G Statistics

pygeoda.local_gstar(w, data, **kwargs)

Local Getis-Ord’s G* Statistics The function to apply Getis-Ord’s local G* statistics

pygeoda.local_quantilelisa(w, data, k, q, …)

Quantile LISA Statistics The function to apply quantile LISA statistics

pygeoda.local_multiquantilelisa(w, data, k, …)

Multivariate Quantile LISA Statistics The function to apply multivariate quantile LISA statistics

pygeoda.neighbor_match_test(geoda_obj, data, …)

Local Neighbor Match Test The local neighbor match test is to assess the extent of overlap between k-nearest neighbors in geographical space and k-nearest neighbors in multi-attribute space.

pygeoda.batchlisa(lisa_obj)

A BatchLISA class wrappers the results of LISA computations

pygeoda.batch_local_moran(w, data, **kwargs)

Apply local moran statistics on a set of variables

pygeoda (spatial clustering)

pygeoda.skater(k, w, data, **kwargs)

Spatial C(K)luster Analysis by Tree Edge Removal

pygeoda.redcap(k, w, data, method, **kwargs)

Regionalization with dynamically constrained agglomerative clustering and partitioning (REDCAP)

pygeoda.schc(k, w, data, linkage_method, …)

Spatially Constrained Hierarchical Clucstering (SCHC)

pygeoda.azp_greedy(p, w, data, **kwargs)

A greedy algorithm to solve the AZP problem

pygeoda.azp_sa(p, w, data[, cooling_rate])

A simulated annealing algorithm to solve the AZP problem

pygeoda.azp_tabu(p, w, data, tabu_length, …)

A tabu-search algorithm to solve the AZP problem

pygeoda.maxp_greedy(w, data, bound_variable, …)

A greedy algorithm to solve the max-p-region problem

pygeoda.maxp_sa(w, data, bound_variable, …)

A simulated annealing algorithm to solve the max-p-region problem

pygeoda.maxp_tabu(w, data, bound_variable, …)

A tabu-search algorithm to solve the max-p-region problem

pygeoda.spatial_validation(geoda_obj, …)

Spatial Validation Spatial validation provides a collection of validation measures including (1) fragmentations (entropy, simpson), (2) join count ratio, (3) compactness - isoperimeter quotient and (4) diameter.

pygeoda.Fragmentation(gda_frag)

Fragmentation measure of spatial validation

pygeoda.Diameter(diam)

Diameter Measure

pygeoda.Compactness(comp)

Compactness Measure

pygeoda.JoinCountRatio(jcr)

Join Count Ratio

pygeoda.ValidationResult(gda_validation)

Spatial Validation Result

pygeoda.make_spatial(clusters, w)

Make spatially constrained clusters Make spatially constrained clusters from non-spatially constrained clusters

pygeoda (classify)

pygeoda.hinge15_breaks(data, **kwargs)

(Box) Hinge15 Breaks

pygeoda.hinge30_breaks(data, **kwargs)

(Box) Hinge30 Breaks

pygeoda.natural_breaks(k, data, **kwargs)

Natural Breaks (Jenks)

pygeoda.quantile_breaks(k, data, **kwargs)

Quantile breaks

pygeoda.percentile_breaks(data, **kwargs)

Percentile breaks

pygeoda.stddev_breaks(data, **kwargs)

Standard deviation breaks

pygeoda (data)

pygeoda.demean(data)

Demean Standardization

pygeoda.standardize(data)

Standardization (Z)

pygeoda.mad(data)

Median Absolute Deviation