ClimTrends
ClimTrends is a python package aimed at making it easy to calculate linear
trends in a variety of statistical models. The current implementation
includes:
- Normal Distribution - trend in mean
- Poisson Distribution - trend in mean
- Exponential Distribution - trend in mean
- Gamma Distribution - trend in mean and standard deviation
- GEV Distribution - trend in mean
The module utilizes datetime-like objects as the input time value, which
makes it easy to interoperate with data from
netCDF4 and
xarray. All models use a Bayesian
framework (using the emcee package) and assume
a uniform prior on all model parameters. This module is object-oriented and
designed to be easily extendable for regressions of other distributions. To do
so, one needs to sub-class the ClimTrendModel class and implement a few
required routines; see TrendNormalModel.py or other Trend*Model.py files
for examples.
Getting started
# dates - a set of input dates
# data - corresponding data from those dates
import climtrends
import numpy as np
# initialize the MCMC model
linear_model = climtrends.TrendNormalModel(dates, data)
# run the sampler
linear_model.run_mcmc_sampler(num_samples = 1000)
# get samples of the slopes
slopes = linear_model.get_mean_trend_samples()
# get the 5th and 95th percentile slopes
slopes_5 = np.percentile(slopes, 5)
slopes_95 = np.percentile(slopes, 95)
Known Issues
- The model assumes that input data are vectors; things will likely break if not.
- Probably other issues exist. This code is tested and is verified to work in some base cases, but it is still in alpha stage and has not been tested across a range of settings.
Metadata
Release files for climtrends 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| climtrends-0.0.2.tar.gz | 17.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| climtrends-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.8 kB
Release files / climtrends-0.0.2.tar.gz
| Download URL | climtrends-0.0.2.tar.gz |
|---|---|
| Size | 17.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
509677c4f91338d84e03510e2a7d6426d697fc6cd57933f54bd9b098207b2c05
|
|
BLAKE2b-256 checksum How to use checksums |
460627a75d6465c113b9e1ed6a6a637d50f06c07b33fc987d6824906dd1b5596
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10
|
Release files / climtrends-0.0.2-py3-none-any.whl
| Download URL | climtrends-0.0.2-py3-none-any.whl |
|---|---|
| Size | 27.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
50ca6a50d28879121cdbad3fbe46c2017735fb48699fc7a1274cd7b46a8c7d97
|
|
BLAKE2b-256 checksum How to use checksums |
c8c64aad77421c9713e0739a3f45fe6e1115084d6458f80a2aa6edd92829ed2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10
|
Security for climtrends 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.