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 |
|
|
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(
threshold=100,
show_up_locs=False,show_down_locs=False,
offset=20)
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.df[['magnitude','duration','filling','draining']].describe()