Metadata-Version: 2.1
Name: metran
Version: 0.3.0
Summary: Python package to perform timeseries analysis of multiple hydrological time series using a dynamic factor model.
Author: W.L. Berendrecht
Maintainer-email: "W.L. Berendrecht" <wilbert@berendrechtconsultancy.nl>, "D.A. Brakenhoff" <d.brakenhoff@artesia-water.nl>, "M.A. Vonk" <m.vonk@artesia-water.nl>
License: The MIT License (MIT)
        
        Copyright (c) 2021 W.L. Berendrecht
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: homepage, https://github.com/pastas/metran
Project-URL: repository, https://github.com/pastas/metran
Project-URL: documentation, https://metran.readthedocs.io/en/latest/
Keywords: hydrology,groundwater,timeseries,analysis
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Other Audience
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Hydrology
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.16.5
Requires-Dist: matplotlib>=3.0
Requires-Dist: pandas>=1.0
Requires-Dist: scipy>=1.1
Requires-Dist: numba
Requires-Dist: pastas>=0.16.0
Provides-Extra: solvers
Requires-Dist: lmfit>=1.0.0; extra == "solvers"
Provides-Extra: linting
Requires-Dist: flake8; extra == "linting"
Provides-Extra: formatting
Requires-Dist: black[jupyter]; extra == "formatting"
Requires-Dist: isort; extra == "formatting"
Provides-Extra: pytesting
Requires-Dist: pytest; extra == "pytesting"
Requires-Dist: pytest-cov; extra == "pytesting"
Requires-Dist: pytest-sugar; extra == "pytesting"
Provides-Extra: coveraging
Requires-Dist: coverage; extra == "coveraging"
Provides-Extra: full
Requires-Dist: metran[solvers]; extra == "full"
Provides-Extra: dev
Requires-Dist: metran[coveraging,linting,pytesting,solvers]; extra == "dev"
Requires-Dist: tox; extra == "dev"

[![metran](https://github.com/pastas/metran/actions/workflows/ci.yml/badge.svg)](https://github.com/pastas/metran/actions/workflows/ci.yml)
[![Documentation Status](https://readthedocs.org/projects/metran/badge/?version=latest)](https://metran.readthedocs.io/en/latest/?badge=latest)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/43056ec3f22341fa992fff4e7b2eeb73)](https://www.codacy.com/gh/pastas/metran/dashboard?utm_source=github.com&utm_medium=referral&utm_content=pastas/metran&utm_campaign=Badge_Grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/43056ec3f22341fa992fff4e7b2eeb73)](https://www.codacy.com/gh/pastas/metran/dashboard?utm_source=github.com&utm_medium=referral&utm_content=pastas/metran&utm_campaign=Badge_Coverage)
![PyPI](https://img.shields.io/pypi/v/metran)

# Metran

Metran is a package for performing multivariate timeseries analysis using a
technique called dynamic factor modelling. It can be used to describe the
variation among many variables in terms of a few underlying but unobserved
variables called factors.

## Documentation

The documention can be found on [metran.readthedocs.io](https://metran.readthedocs.io/)

### Examples

For a brief introduction of the theory behind Metran on multivariate timeseries analysis with
dynamic factor modeling see the notebook:

- [The Dynamic Factor Model](https://github.com/pastas/metran/blob/main/examples/dynamic_factor_model.ipynb)

A practical real-world example, as published in Stromingen (Van Geer, 2015), is given in the following notebook:

- [Metran practical example](https://github.com/pastas/metran/blob/main/examples/metran_practical_example.ipynb)

A notebook on how to use [Pastas](https://github.com/pastas/pastas) models output with Metran:

- [Pastas Metran example](https://github.com/pastas/metran/blob/main/examples/pastas_metran_example.ipynb)

## Installation

To install Metran, a working version of Python 3.8 or higher has to be installed on your computer.
We recommend using the [Anaconda distribution](https://www.anaconda.com/) as it includes most
of the python package dependencies and the Jupyter Notebook software to run the
notebooks. However, you are free to install any Python distribution you want.

To install `metran`, type the following command

`pip install metran`

To install in development mode, clone the repository and type the following from the module root directory:

`pip install -e .`

### Dependencies

Metran has the following dependencies which are automatically installed if
not already available: `numpy`, `scipy`, `pandas`, `matplotlib`, `numba` and `pastas`

## References

- Berendrecht, W.L. (2004). [State space modeling of groundwater fluctuations](https://repository.tudelft.nl/islandora/object/uuid:f12775fc-a804-4d4a-8872-664e5a61cbf5/datastream/OBJ). Doctoral Thesis, Delft University of Technology.
- Berendrecht, W.L., F.C. van Geer (2016). [A dynamic factor modeling framework for analyzing multiple groundwater head series simultaneously](http://dx.doi.org/10.1016/j.jhydrol.2016.02.028). Journal of Hydrology, 536, pp. 50-60.
- Van Geer, F.C. en W.L. Berendrecht (2015) [Meervoudige tijdreeksmodellen en de samenhang in stijghoogtereeksen](https://edepot.wur.nl/378871). Stromingen 23 nummer 3, pp. 25-36.
