Table Of Contents

Previous topic

Libraries

Next topic

evaporation module

This Page

Standardized Precipitation Index (SPI)

spi

The spi module defines a single function, spi to compute the standardized precipitation index.

spi(rainfall, span=3, freq='monthly', start_reference=None, end_reference=None, distribution='gamma')

Computes the standardized precipitation index for the precipitation series at the given span.

Parameters:

rainfall : time_series

Series of monthly cumulative precipitation.

span : {3, int} optional

Span, in months.

freq : {‘monthly’,’weekly’} optional

Frequency

start_reference : {None, Date} optional

Starting date of the reference period. If None, use the first date of the series.

end_reference : {None, Date} optional

Ending date of the reference period. If None, use the last date of the series.

distribution : {‘gamma’,’normal’} optional

Type of distribution for the data of each period.