Giter Club home page Giter Club logo

pygeoda's Introduction

pygeoda

PyPI version PyPI - Downloads Anaconda-Server Badge Anaconda-Server Badge

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

Quick Start

  • pygeoda + ESRI Shapefile
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
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.0.8

  • 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;

pygeoda's People

Contributors

lixun910 avatar zh345 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.