https://github.com/ArtesiaWater/hydropandas
Module for loading observation data into custom DataFrames
https://github.com/ArtesiaWater/hydropandas
data groundwater hydrology observations pandas timeseries
Last synced: 3 months ago
JSON representation
Module for loading observation data into custom DataFrames
- Host: GitHub
- URL: https://github.com/ArtesiaWater/hydropandas
- Owner: ArtesiaWater
- License: mit
- Created: 2019-06-28T09:58:59.000Z (over 6 years ago)
- Default Branch: dev
- Last Pushed: 2025-07-15T07:36:47.000Z (3 months ago)
- Last Synced: 2025-07-15T09:07:07.906Z (3 months ago)
- Topics: data, groundwater, hydrology, observations, pandas, timeseries
- Language: Python
- Homepage: https://hydropandas.readthedocs.io
- Size: 46.1 MB
- Stars: 64
- Watchers: 6
- Forks: 12
- Open Issues: 19
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
- open-sustainable-technology - Hydropandas - A Python package for reading, analyzing, and writing hydrological time series from a pandas DataFrame, with all of its wonderful features, and extended with custom methods and attributes related to hydrological time series. (Hydrosphere / Ocean and Hydrology Data Access)
README

[](https://pypi.python.org/pypi/hydropandas)
[](https://pypi.python.org/pypi/hydropandas)
[
](https://codespaces.new/ArtesiaWater/hydropandas?quickstart=1)
[](https://github.com/astral-sh/ruff)
[](https://github.com/ArtesiaWater/hydropandas/actions/workflows/on_pr_master.yml)
[](https://app.codacy.com/gh/ArtesiaWater/hydropandas/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[](https://app.codacy.com/gh/ArtesiaWater/hydropandas/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)
[](https://hydropandas.readthedocs.io/en/latest/?badge=latest)
[](https://app.codacy.com/gh/ArtesiaWater/hydropandas/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)
# HydroPandas
Hydropandas is a Python package for reading, analyzing and writing
(hydrological) timeseries.
## Reading
The HydroPandas package provides convenient read functions from various sources.
The table below lists all API-accessible sources. Click a link in the first column
for the documentation. The "API available" column indicates current availability
(updated weekly).
| source | observations | API available | location |
|-----------------|------------------------------------|---------------|----------------------|
| [BRO](https://hydropandas.readthedocs.io/en/stable/examples/01_groundwater_observations.html) | Groundwater | [](https://github.com/ArtesiaWater/hydropandas/actions/workflows/bro.yml) | Netherlands |
| [KNMI](https://hydropandas.readthedocs.io/en/stable/examples/02_knmi_observations.html) | Meteorological | [](https://github.com/ArtesiaWater/hydropandas/actions/workflows/knmi.yml) | Netherlands |
| [Lizard](https://hydropandas.readthedocs.io/en/stable/examples/06_lizard.html) | Groundwater | [](https://github.com/ArtesiaWater/hydropandas/actions/workflows/lizard.yml) | Netherlands (Vitens) |
| [Waterconnect](https://hydropandas.readthedocs.io/en/stable/examples/09_water_connect.html) | Groundwater | [](https://github.com/ArtesiaWater/hydropandas/actions/workflows/waterconnect.yml) | South Australia |
| [Waterinfo](https://hydropandas.readthedocs.io/en/stable/examples/08_waterinfo.html) | Surface water quantity and quality | [](https://github.com/ArtesiaWater/hydropandas/actions/workflows/waterinfo.yml) | Netherlands |
---
Some sources also provide files readable by HydroPandas.
| source | observations | file format | location |
|-----------------|------------------------------------|----------------------|----------------------|
| [BRO](https://hydropandas.readthedocs.io/en/stable/examples/01_groundwater_observations.html) | Groundwater | xml | Netherlands |
| [DINO](https://hydropandas.readthedocs.io/en/stable/examples/01_groundwater_observations.html) | Groundwater / surface water | csv | Netherlands |
| [FEWS](https://hydropandas.readthedocs.io/en/stable/examples/07_fews.html) | Groundwater / surface water | xml | Netherlands |
| [KNMI](https://hydropandas.readthedocs.io/en/stable/examples/02_knmi_observations.html) | Meteorological | txt | Netherlands |
| [Pastastore](https://hydropandas.readthedocs.io/en/stable/examples/03_hydropandas_and_pastas.html) | Time series models | NA | NA |
| [Waterinfo](https://hydropandas.readthedocs.io/en/stable/examples/08_waterinfo.html) | Surface water quantity and quality | csv / zip | Netherlands |
| Wiski (no docs available) | Groundwater | csv | Netherlands |
---
## Install
Install the module with pip:
`pip install hydropandas`
For some functionality additional packages are required. Install all optional packages:
`pip install hydropandas[full]`
For installing in development mode, clone the repository and install by
typing `pip install -e .[full]` from the module root directory.
## Documentation
- Documentation is provided on the dedicated website
[hydropandas.readthedocs.io](https://hydropandas.readthedocs.io/en/stable/)
- Examples are available in the [examples directory on the documentation website](https://hydropandas.readthedocs.io/en/stable/examples.html)
- View and edit the example notebooks of hydropandas in
[GitHub Codespaces](https://codespaces.new/hydropandas/hydropandas?quickstart=1)
## 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).
## Structure
The HydroPandas package allows users to store a timeseries and metadata in a
single object (Obs class). Or store a collection of timeseries with metadata
in a single object (ObsCollection class). Both inheret from a pandas DataFrame
and are extended with custom methods and attributes related to hydrological timeseries.
### The Obs class
The Obs class holds the measurements and metadata for one timeseries. There are
currently 7 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 contains specific methods to read data from specific sources.
### The ObsCollection class
The ObsCollection class hold the data for a collection of Obs classes, e.g.
10 timeseries of the groundwater level in a certain area. The
ObsCollection is essentialy 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 that holds the
measurements. It's recommended to use one ObsCollection per observation type — for
example, group 10 GroundwaterObs in one collection and 5 PrecipitationObs in another.
More information on dealing with Obs and ObsCollection objects in [the documentation](https://hydropandas.readthedocs.io/en/stable/examples/00_hydropandas_objects.html)
## Authors
- Onno Ebbens, Artesia
- Ruben Caljé, Artesia
- Davíd Brakenhoff, Artesia
- Martin Vonk, Artesia