{"id":13949157,"url":"https://github.com/martinvonk/SPEI","last_synced_at":"2025-07-20T11:31:01.570Z","repository":{"id":50329957,"uuid":"518788708","full_name":"martinvonk/SPEI","owner":"martinvonk","description":"A simple Python package to calculate and visualize some popular drought indices such as the SPI, SPEI and SGI.","archived":false,"fork":false,"pushed_at":"2025-06-26T08:42:04.000Z","size":31630,"stargazers_count":86,"open_issues_count":3,"forks_count":11,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-15T06:23:33.762Z","etag":null,"topics":["drought","drought-index","drought-indices","groundwater","hydrology","python","sgi","spei","spi","timeseries"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/martinvonk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-07-28T09:49:22.000Z","updated_at":"2025-07-11T02:56:34.000Z","dependencies_parsed_at":"2023-09-21T19:14:39.375Z","dependency_job_id":"23fc9ee2-08e3-4f59-88fc-e134bbb880fe","html_url":"https://github.com/martinvonk/SPEI","commit_stats":{"total_commits":229,"total_committers":1,"mean_commits":229.0,"dds":0.0,"last_synced_commit":"a422933cb6b98605e143aac846c2374af390afb2"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/martinvonk/SPEI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinvonk%2FSPEI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinvonk%2FSPEI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinvonk%2FSPEI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinvonk%2FSPEI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martinvonk","download_url":"https://codeload.github.com/martinvonk/SPEI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinvonk%2FSPEI/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265482279,"owners_count":23774028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["drought","drought-index","drought-indices","groundwater","hydrology","python","sgi","spei","spi","timeseries"],"created_at":"2024-08-08T05:01:39.544Z","updated_at":"2025-07-20T11:31:01.561Z","avatar_url":"https://github.com/martinvonk.png","language":"Python","funding_links":[],"categories":["Natural Resources"],"sub_categories":["Water Supply and Quality"],"readme":"# SPEI\n\n[![PyPI](https://img.shields.io/pypi/v/spei?style=flat-square)](https://pypi.org/project/spei/)\n[![PyPi Supported Python Versions](https://img.shields.io/pypi/pyversions/spei?style=flat-square)](https://pypi.org/project/spei/)\n[![Code Size](https://img.shields.io/github/languages/code-size/martinvonk/spei?style=flat-square)](https://pypi.org/project/spei/)\n[![PyPi Downloads](https://img.shields.io/pypi/dm/spei?style=flat-square)](https://pypi.org/project/spei/)\n[![License](https://img.shields.io/pypi/l/spei?style=flat-square)](https://pypi.org/project/spei/)\n[![DOI](https://img.shields.io/badge/DOI-10.5281/zenodo.10816741-blue?style=flat-square)](https://doi.org/10.5281/zenodo.10816741)\n\n[![Tests](https://img.shields.io/github/actions/workflow/status/martinvonk/spei/tests.yml?style=flat-square)](https://github.com/martinvonk/SPEI/actions/workflows/tests.yml)\n[![CodacyCoverage](https://img.shields.io/codacy/coverage/908b566912314666b84e1add22ea7d66?style=flat-square)](https://app.codacy.com/gh/martinvonk/SPEI/)\n[![CodacyGrade](https://img.shields.io/codacy/grade/908b566912314666b84e1add22ea7d66?style=flat-square)](https://app.codacy.com/gh/martinvonk/SPEI/)\n[![Typed: MyPy](https://img.shields.io/badge/type_checker-mypy-2A6DB2?style=flat-square)](https://mypy-lang.org/)\n[![Formatter and Linter: ruff](https://img.shields.io/badge/linter-ruff-red?style=flat-square)](https://github.com/charliermarsh/ruff)\n\nSPEI is a simple Python package to calculate drought indices for hydrological time series. This package uses popular Python packages such as Pandas and Scipy to make it easy and versatile for the user to calculate the drought indices. Pandas Series are great for dealing with time series; providing interpolation, rolling average, and other manipulation options. SciPy enables us to use all different kinds of [distributions](https://docs.scipy.org/doc/scipy/reference/stats.html#probability-distributions) to fit the data. Different popular drought indices are supported such as the SPI (Standardized Precipitation Index), SPEI (Standardized Precipitation Evaporation Index), and SGI (Standardized Groundwater Index).\n\nIf you happen to use this package, please cite: Vonk, M. A. (2024). SPEI: A simple Python package to calculate and visualize drought indices (vX.X.X). Zenodo. https://doi.org/10.5281/zenodo.10816741.\n\n## Available Drought Indices\n\n| Drought Index                                 | Abbreviation | Literature |\n| --------------------------------------------- | ------------ | ---------- |\n| Standardized Precipitation Index              | SPI          | 1          |\n| Standardized Precipitation Evaporation Index* | SPEI         | 2          |\n| Standardized Groundwater Index                | SGI          | 3,4        |\n| Standardized Streamflow Index                 | SSFI         | 5,6        |\n| Standardized Soil Moisture Index              | SSMI         | 7          |\n\nThe package is not limited to only these five drought indices. If any of the distributions in the Scipy library is valid on the observed hydrological series, the drought index can be calculated.\n\n*For the calculation of potential evaporation, take a look at [pyet](https://github.com/phydrus/pyet). This is another great package that also uses pandas Series to calculate different kinds of potential evaporation time series.\n\n## Installation\n\nTo get the latest stable version install using:\n\n`pip install spei`\n\nTo get the development version download or clone the GitHub repository to your local device. Install using:\n\n`pip install -e \u003cdownload_directory\u003e`\n\n## Literature\n\nThis list of scientific literature is helpful as a reference to understand the context and application of drought indices.\n\n1. Lloyd-Hughes, B. and M.A. Saunders (2002) - A Drought Climatology for Europe. DOI: 10.1002/joc.846\n2. Vicente-Serrano, S.M., S. Beguería and J.I. López-Moreno (2010) - A Multi-scalar drought index sensitive to global warming: The Standardized Precipitation Evapotranspiration Index. DOI: 10.1175/2009JCLI2909.1\n3. Bloomfield, J.P. and B.P. Marchant (2013) - Analysis of groundwater drought building on the standardised precipitation index approach. DOI: 10.5194/hess-17-4769-2013\n4. Babre, A., A. Kalvāns, Z. Avotniece, I. Retiķe, J. Bikše, K.P.M. Jemeljanova, A. Zelenkevičs and A. Dēliņa (2022) - The use of predefined drought indices for the assessment of groundwater drought episodes in the Baltic States over the period 1989–2018. DOI: 10.1016/j.ejrh.2022.101049\n5. Vicente-Serrano, S. M., J. I. López-Moreno, S. Beguería, J. Lorenzo-Lacruz, C. Azorin-Molina, and E. Morán-Tejeda (2012). Accurate Computation of a Streamflow Drought Index. Journal of Hydrologic Engineering. American Society of Civil Engineers. DOI: 10.1061/(asce)he.1943-5584.0000433\n6. Tijdeman, E.,  K. Stahl and L.M. Tallaksen (2020) - Drought characteristics derived based on the Standardized Streamflow Index: A large sample comparison for parametric and nonparametric methods. DOI: 10.1029/2019WR026315\n7. Carrão. H., Russo, S., Sepulcre-Canto, G., Barbosa, P.: An empirical standardized soil moisture index for agricultural drought assessment from remotely sensed data. DOI: 10.1016/j.jag.2015.06.011s\n\n### Publications\nThese are scientific publications that use and cite this Python package via [Zenodo](https://doi.org/10.5281/zenodo.10816741):\n\nvan Mourik, J., Ruijsch, D., van der Wiel, K., Hazeleger, W., \u0026 Wanders, N. (2025). Regional drivers and characteristics of multi-year droughts. Weather and Climate Extremes, 48, 100748. https://doi.org/10.1016/j.wace.2025.100748\n\nSegura-Barrero, R., Lauvaux, T., Lian, J., Ciais, P., Badia, A., Ventura, S., Bazzi, H., Abbessi, E., Fu, Z., Xiao, J., Li, X., \u0026 Villalba, G. (2025). Heat and Drought Events Alter Biogenic Capacity to Balance CO2 Budget in South-Western Europe. Global biogeochemical cycles, 39(1), e2024GB008163. https://doi.org/10.1029/2024GB008163\n\nAdla, S., Šaponjić, A., Tyagi, A., Nagi, A., Pastore, P., \u0026 Pande, S. (2024). Steering agricultural interventions towards sustained irrigation adoption by farmers: socio-psychological analysis of irrigation practices in Maharashtra, India. Hydrological Sciences Journal, 69(12), 1586–1603. https://doi.org/10.1080/02626667.2024.2376709\n\nPanigrahi, S., Vidyarthi, V.K. (2025). Assessing the Suitability of SPI and SPEI in Steppe Hot and Arid Climatic Zones in India. In: Sefelnasr, A., Sherif, M., Singh, V.P. (eds) Water Resources Management and Sustainability. Water Science and Technology Library, vol 114. Springer, Cham. https://doi.org/10.1007/978-3-031-80520-2_12\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinvonk%2FSPEI","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartinvonk%2FSPEI","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinvonk%2FSPEI/lists"}