https://github.com/geodacenter/pygeoda
pygeoda is a python library for spatial data analysis based on C++ libgeoda
https://github.com/geodacenter/pygeoda
Last synced: 26 days ago
JSON representation
pygeoda is a python library for spatial data analysis based on C++ libgeoda
- Host: GitHub
- URL: https://github.com/geodacenter/pygeoda
- Owner: GeoDaCenter
- License: gpl-3.0
- Created: 2020-05-21T17:30:02.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2025-01-30T03:07:26.000Z (3 months ago)
- Last Synced: 2025-03-30T09:06:48.534Z (about 1 month ago)
- Language: C++
- Homepage:
- Size: 20.9 MB
- Stars: 41
- Watchers: 3
- Forks: 5
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pygeoda
[](https://badge.fury.io/py/pygeoda)

[](https://anaconda.org/conda-forge/pygeoda)
[](https://anaconda.org/conda-forge/pygeoda)pygeoda is a python library for spatial data analysis based on libgeoda and GeoDa. It provides spatial data analysis functionalities including Exploratory Spatial Data Analysis, Spatial Cluster Detection and Clustering Analysis, Regionalization, etc. based on the C++ source code of GeoDa, which is an open-source software tool that serves as an introduction to spatial data analysis.
### Installation
To install from PyPi:
```
pip install pygeoda
```To install with conda run:
```
conda install -c conda-forge pygeoda
```To install from source: (See more details: https://geodacenter.github.io/pygeoda/install.html)
```
pip install git+https://github.com/geodacenter/pygeoda
```#### Documentation
[https://geodacenter.github.io/pygeoda](https://geodacenter.github.io/pygeoda)
#### Citation
Anselin, L., Li, X. and Koschinsky, J. (2022), GeoDa, From the Desktop to an Ecosystem for Exploring Spatial Data. Geogr Anal, 54: 439-466. [Download Citation](https://onlinelibrary.wiley.com/action/showCitFormats?doi=10.1111%2Fgean.12311)
#### Quick Start
* pygeoda + ESRI Shapefile
```Python
import pygeoda
gda = pygeoda.open('./data/Guerry.shp')
w = pygeoda.queen_weights(gda)
lisa = pygeoda.local_moran(w, gda['Crm_prs'])
#lisa object:
# lisa_values(): [0.516120231288079, 0.8182751384950308, ...]
# lisa_pvalues(): [0.197, 0.013, ...]
# lisa_num_nbrs(): [4, 6, ...]
# lisa_clusters(): [0, 1, ...]
# lisa_labels(): ('Not significant', 'High-High', 'Low-Low', 'High-Low', 'Low-High', 'Undefined', 'Isolated')
# lisa_colors(): ('#eeeeee', '#FF0000', '#0000FF', '#a7adf9', '#f4ada8', '#464646', '#999999')
```* pygeoda + GeoPandas
```Python
import geopandas
df = geopandas.read_file('./data/Guerry.shp')import pygeoda
gda = pygeoda.open(df)
w = pygeoda.queen_weights(gda)
lisa = pygeoda.local_moran(w, gda['Crm_prs'])
#lisa object:
# lisa_values(): [0.516120231288079, 0.8182751384950308, ...]
# lisa_pvalues(): [0.197, 0.013, ...]
# lisa_num_nbrs(): [4, 6, ...]
# lisa_clusters(): [0, 1, ...]
# lisa_labels(): ('Not significant', 'High-High', 'Low-Low', 'High-Low', 'Low-High', 'Undefined', 'Isolated')
# lisa_colors(): ('#eeeeee', '#FF0000', '#0000FF', '#a7adf9', '#f4ada8', '#464646', '#999999')
```## Current version 0.1.0
* Spatial Weights
* Queen
* Rook
* Distance based
* K-Nearest Neighbor
* Kernel
* Local Indicators of Spatial Association (LISA)
* Local Moran
* Local Geary
* Local Getis-Ord
* Local Join Count
* Multivariate Local Geary
* Local Join Count
* Bivariate Local Join Count
* (Multivariate) Colocation Local Join Count
* Quantile LISA
* Multivariate Quantile LISA* Spatial Clustering
* SCHC Spatial Constrained Hierarchical Clustering
* Single-linkage
* Complete-linkage
* Average-linkage
* Ward-linkage
* SKATER
* REDCAP
* First-order and Single-linkage
* Full-order and Complete-linkage
* Full-order and Average-linkage
* Full-order and Single-linkage
* Full-order and Ward-linkage
* AZP
* greedy
* Tabu Search
* Simulated Annealing
* Max-p
* greedy
* Tabu Search
* Simulated Annealing
* Map Classification
* NaturalBreaks
* QuantileBreaks
* Hinge15Breaks
* Hinge30Breaks
* PercentileBreaks
* StddevBreaks
* Data
* Demean standardize
* Standardize data (Z)
* Median absolute deviation## Authors
Xun Li and Luc Anselin
## Contributors
Guanpeng Dong; Yong Liu; Hang Zhang; Yeqing Han;