Skip to main content

A simple Python package to calculate drought indices for time series such as the SPI, SPEI and SGI.

Project description

SPEI

A simple Python package to calculate drought indices for time series such as the SPI (Standardized Precipitation Index), SPEI (Standardized Precipitation Evaporation Index) and SGI (Standardized Groundwater Index). There are other great packages available to calculate these indices However, they are either written in R such as SPEI or don't have the Standardized Groundwater Index such as climate_indices. Additionaly, these packages provide ways to analyse spatial data but it is easier to only deal with time series. Therefore, this package uses the popular Python packages such as Pandas and Scipy to make it easy but versitile for the user to calculate the drought indices. With the use of Scipy all distributions available in the library can be used to fit the data. However, there are general recommendations for distributions when calculating the SPEI, SPI an SGI.

Note that this package does not calculate potential evaporation, we refer to pyet for that. All time series have to be calculated in advance and be provided as a pandas Series.

Installation

To get the latest stable version install using:

pip install spei

To get the development version download the GitHub code to your computer. Use cd to get to the download directory and install using:

pip install -e .

To Do

  • Setup package in nice way

  • Check SGI for other distributions

  • Check distribution correction for x = 0

  • Add way to identify best distribution on time series (with Scipy, Fitter or distfit)

  • Add examples

  • Add docstring

  • Add Visualisation with Matplotlib

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spei-0.1.3.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

spei-0.1.3-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file spei-0.1.3.tar.gz.

File metadata

  • Download URL: spei-0.1.3.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for spei-0.1.3.tar.gz
Algorithm Hash digest
SHA256 829c226920e2ff85c46a8562464b0eb6be4851fe11f8abb1aab303b0f4ae706c
MD5 4789ae51b1fb4f45e923b9ce7932d158
BLAKE2b-256 d0a39cfcf79f2606557d897402db48487afa16b3045cf6a69ce8f5d8fb9d4e36

See more details on using hashes here.

File details

Details for the file spei-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: spei-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for spei-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f6f337d685685d0af27f2f33e162a2e6624a45d149d715c5bfaa4cf1a0e3dc42
MD5 0ca1d35a877cc172717f39e1b4de6347
BLAKE2b-256 65fdaf8df6b218497e22d6669e8914e81fc102f2779d793a9e3d3f77cd0fec3d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page