Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Standardized Index class #33

Merged
merged 4 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 46 additions & 29 deletions doc/examples/example01_indices.ipynb

Large diffs are not rendered by default.

478 changes: 60 additions & 418 deletions doc/examples/example02_distributions.ipynb

Large diffs are not rendered by default.

79 changes: 50 additions & 29 deletions doc/examples/example03_drought_NL.ipynb

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions doc/examples/example04_package_comparison.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
"import pastas as ps\n",
"import pandas as pd\n",
"import scipy.stats as scs\n",
"import matplotlib.pyplot as plt"
"import matplotlib.pyplot as plt\n",
"\n",
"print(si.show_versions())"
]
},
{
Expand Down Expand Up @@ -128,7 +130,7 @@
}
],
"source": [
"spi = si.spi(prec_rsum, dist=scs.gamma, prob_zero=True, freq=\"ME\")\n",
"spi = si.spi(prec_rsum, dist=scs.gamma, prob_zero=True, fit_freq=\"ME\")\n",
"spi # pandas Series"
]
},
Expand Down Expand Up @@ -449,7 +451,7 @@
" parse_dates=True,\n",
").squeeze()\n",
"\n",
"sgi = si.sgi(head, freq=\"ME\")\n",
"sgi = si.sgi(head, fit_freq=\"ME\")\n",
"sgi_pastas = ps.stats.sgi(head)"
]
},
Expand Down
2 changes: 1 addition & 1 deletion src/spei/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# flake8: noqa
from . import climdex, dist, plot, si, utils
from ._version import __version__, show_versions
from .si import sgi, spei, spi, ssfi
from .si import SI, sgi, spei, spi, ssfi
2 changes: 1 addition & 1 deletion src/spei/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
__version__ = "0.4.0"


def show_versions() -> None:
def show_versions() -> str:
msg = f"Versions\npython: {python_version()}\nspei: {__version__}\n"

requirements = metadata.requires("spei")
Expand Down
Loading