Skip to content

Latest commit

 

History

History
50 lines (40 loc) · 1010 Bytes

Drawdowns.md

File metadata and controls

50 lines (40 loc) · 1010 Bytes
jupyter
jupytext kernelspec
text_representation
extension format_name format_version jupytext_version
.md
markdown
1.3
1.14.4
display_name language name
drawdowns
python
drawdowns

Drawdown

Find the locations, magnitude, and duration of drawdown events in a time series of Plant Available Water Storage.

from Drawdown import Drawdown, cum_dist
file = 'BoulderS.csv'
drawdown = Drawdown(filename=file, find_drawdowns=True, debug=False)

Drawdown Plot

drawdown.plot(
    threshold=100,
    show_up_locs=False,show_down_locs=False,
    offset=20)

Drawdown Distribution

from matplotlib import pyplot as plot
x, y = cum_dist(drawdown.df['magnitude'])
plot.plot(x,y)
plot.xlabel('Drawdown Size, d (cm)')
plot.ylabel('Cumulative Distribution, F(d)')
plot.title('CDF of Drawdown Sizes, F(d)')

Drawdown Stats

drawdown.df[['magnitude','duration','filling','draining']].describe()