Metadata-Version: 2.1
Name: hydropandas
Version: 0.9.1
Summary: Module by Artesia for loading observation data into custom DataFrames.
Author-email: Onno Ebbens <o.ebbens@artesia-water.nl>
Maintainer-email: "O.N. Ebbens" <o.ebbens@artesia-water.nl>, "R. Calje" <r.calje@artesia-water.nl>, "D.A. Brakenhoff" <d.brakenhoff@artesia-water.nl>, "M.A. Vonk" <m.vonk@artesia-water.nl>
License: The MIT License (MIT)
        
        Copyright (c) 2020 O.E. Ebbens, D.A. Brakenhoff, R. Calje
        
        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://www.artesia-water.nl
Project-URL: repository, https://github.com/artesiawater/hydropandas
Project-URL: documentation, https://hydropandas.readthedocs.io/en/stable/
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.7
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: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Hydrology
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: scipy
Requires-Dist: pandas<2.1.0
Requires-Dist: matplotlib
Requires-Dist: tqdm
Requires-Dist: requests
Requires-Dist: colorama
Provides-Extra: full
Requires-Dist: geopandas; extra == "full"
Requires-Dist: openpyxl; extra == "full"
Requires-Dist: pastastore; extra == "full"
Requires-Dist: bokeh; extra == "full"
Requires-Dist: branca; extra == "full"
Requires-Dist: folium; extra == "full"
Requires-Dist: flopy; extra == "full"
Requires-Dist: xarray; extra == "full"
Requires-Dist: shapely; extra == "full"
Requires-Dist: pyproj; extra == "full"
Requires-Dist: contextily; extra == "full"
Requires-Dist: lxml; extra == "full"
Provides-Extra: rtd
Requires-Dist: hydropandas[full]; extra == "rtd"
Requires-Dist: imod; extra == "rtd"
Requires-Dist: requests; extra == "rtd"
Requires-Dist: Shapely; extra == "rtd"
Requires-Dist: nbconvert; extra == "rtd"
Requires-Dist: ipykernel; extra == "rtd"
Requires-Dist: netCDF4; extra == "rtd"
Requires-Dist: docutils<0.18; extra == "rtd"
Requires-Dist: sphinx_rtd_theme; extra == "rtd"
Requires-Dist: Ipython; extra == "rtd"
Requires-Dist: nbsphinx; extra == "rtd"
Requires-Dist: nbsphinx_link; extra == "rtd"
Provides-Extra: linting
Requires-Dist: flake8; extra == "linting"
Requires-Dist: ruff; extra == "linting"
Provides-Extra: formatting
Requires-Dist: black[jupyter]; extra == "formatting"
Requires-Dist: isort; extra == "formatting"
Provides-Extra: pytesting
Requires-Dist: hydropandas[full,rtd]; extra == "pytesting"
Requires-Dist: pytest>=7; extra == "pytesting"
Requires-Dist: pytest-cov; extra == "pytesting"
Requires-Dist: pytest-sugar; extra == "pytesting"
Provides-Extra: coveraging
Requires-Dist: coverage; extra == "coveraging"
Provides-Extra: dev
Requires-Dist: hydropandas[formatting,linting,pytesting]; extra == "dev"
Requires-Dist: tox; extra == "dev"

<img src="/docs/_static/Artesia_logo.jpg" alt="Artesia" width="200" align="right">

[![PyPi](https://img.shields.io/pypi/v/hydropandas.svg)](https://pypi.python.org/pypi/hydropandas)
[![PyPi Supported Python Versions](https://img.shields.io/pypi/pyversions/hydropandas)](https://pypi.python.org/pypi/hydropandas)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ArtesiaWater/hydropandas/master)

[![hydropandas](https://github.com/ArtesiaWater/hydropandas/workflows/hydropandas/badge.svg)](https://github.com/ArtesiaWater/hydropandas/actions?query=workflow%3Ahydropandas)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/c1b99f474bdc49b0a47e00e4e9f66c2f)](https://www.codacy.com/gh/ArtesiaWater/hydropandas/dashboard?utm_source=github.com&utm_medium=referral&utm_content=ArtesiaWater/hydropandas&utm_campaign=Badge_Grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/c1b99f474bdc49b0a47e00e4e9f66c2f)](https://www.codacy.com/gh/ArtesiaWater/hydropandas/dashboard?utm_source=github.com&utm_medium=referral&utm_content=ArtesiaWater/hydropandas&utm_campaign=Badge_Coverage)
[![Documentation Status](https://readthedocs.org/projects/hydropandas/badge/?version=latest)](https://hydropandas.readthedocs.io/en/latest/?badge=latest)

[![Format: isort](https://img.shields.io/badge/imports-isort-ef8336)](https://pycqa.github.io/isort/index.html)
[![Format: Black](https://img.shields.io/badge/code_style-black-black)](https://github.com/psf/black)
[![Linter: flake8](https://img.shields.io/badge/linter-flake8-yellowgreen)](https://flake8.pycqa.org/)
[![Linter: ruff](https://img.shields.io/badge/linter-ruff-red)](https://github.com/charliermarsh/ruff)

# HydroPandas

Hydropandas is a Python package for reading, analyzing and writing
(hydrological) timeseries data.

## Introduction

The HydroPandas package allows users to store a timeseries and metadata in a
single object. This object inherits from a pandas DataFrame, with all its
wonderful features, and is extended with custom methods and attributes related
to hydrological timeseries.

The HydroPandas package also provides convenient read functions for Dutch hydrological data from:

- [BRO](https://www.broloket.nl)
- [DINO](https://www.dinoloket.nl)
- FEWS PI-XML
- [KNMI](https://www.knmi.nl/kennis-en-datacentrum/achtergrond/data-ophalen-vanuit-een-script)
- MODFLOW groundwater models
- IMOD groundwater models
- [Pastastore](https://github.com/pastas/pastastore)
- [waterinfo](https://waterinfo.rws.nl/)
- WISKI csv files

## Install

Install the module with pip:

`pip install hydropandas`

HydroPandas requires `pandas`, `scipy`, `matplotlib`, `tqdm`, `requests` and `colorama`.

For some functionality additional packages are required:

- `geopandas`: for dealing with shapefiles
- `pastastore`: for reading or storing data from PastaStore
- `bokeh`, `branca`, `folium`: for interactive maps
- `flopy`: for reading data from MODFLOW models
- `xarray`: for loading data from REGIS

For installing in development mode, clone the repository and install by
typing `pip install -e .` from the module root directory.
For installing all the optional packages use `pip install -e .[full]`.

## Get in touch

- Questions on HydroPandas ("How can I?") can be asked and answered on [Github Discussions](https://github.com/ArtesiaWater/hydropandas/discussions).
- Bugs, feature requests and other improvements can be posted as [Github Issues](https://github.com/ArtesiaWater/hydropandas/issues).
- Find out how to contribute to HydroPandas at our [Contribution page](https://hydropandas.readthedocs.io/en/stable/contribute.html).

## Examples

Importing a groundwater time series from the BRO using the BRO-id and the tube number:

```python
import hydropandas as hpd
gw_bro = hpd.GroundwaterObs.from_bro("GMW000000041261", 1)
```

Or import all groundwater time series from the BRO within a certain extent:

```python
oc = hpd.read_bro(extent=(117850, 118180, 439550, 439900))
```

## The Obs class

The Obs class holds the measurements and metadata for one timeseries. There are
currently 5 specific Obs classes for different types of measurements:

- GroundwaterObs: for groundwater measurements
- WaterQualityObs: for groundwater quality measurements
- WaterlvlObs: for surface water level measurements
- ModelObs: for "observations" from a MODFLOW model
- MeteoObs: for meteorological observations
- PrecipitationObs: for precipitation observations, subclass of MeteoObs
- EvaporationObs: for evaporation observations, subclass of MeteoObs

Each of these Obs classes is essentially a pandas DataFrame with additional
methods and attributes related to the type of measurement that it holds.
Each Obs object also contain specific methods to read data from specific sources.

## The ObsCollection class

The ObsCollection class, as the name implies, represents a collection of Obs
classes, e.g. 10 timeseries of the groundwater level in a certain area. The
ObsCollection is also a pandas DataFrame in which each timeseries is stored
in a different row. Each row contains metadata (e.g. latitude and longitude
of the observation point) and the Obs object (DataFrame) that holds the
measurements. It is recommended to let an ObsCollection contain only one Obs
type, e.g. to create an ObsCollection for 10 GroundwaterObs, and a separate
ObsCollection for 5 PrecipitationObs.

Like the Obs class, the ObsCollection class contains a bunch of methods for
reading data from different sources. See the next section for supported data
sources.

## Authors

- Onno Ebbens, Artesia
- Ruben Caljé, Artesia
- Davíd Brakenhoff, Artesia
- Martin Vonk, Artesia
