Skip to main content

Module by Artesia for loading observation data into custom DataFrames.

Project description

Artesia

PyPi PyPi Supported Python Versions Ruff

hydropandas Codacy Badge Codacy Badge Documentation Status

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 Groundwater BRO Netherlands
KNMI Meteorological KNMI Netherlands
Lizard Groundwater Lizard Netherlands (Vitens)
Waterconnect Groundwater Waterconnect South Australia
Waterinfo Surface water quantity and quality Waterinfo Netherlands

Some sources also provide files readable by HydroPandas.

source observations file format location
BRO Groundwater xml Netherlands
DINO Groundwater / surface water csv Netherlands
FEWS Groundwater / surface water xml Netherlands
KNMI Meteorological txt Netherlands
Pastastore Time series models NA NA
Waterinfo 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

Get in touch

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

Authors

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hydropandas-0.14.0.tar.gz (174.8 kB view details)

Uploaded Source

Built Distribution

hydropandas-0.14.0-py3-none-any.whl (173.0 kB view details)

Uploaded Python 3

File details

Details for the file hydropandas-0.14.0.tar.gz.

File metadata

  • Download URL: hydropandas-0.14.0.tar.gz
  • Upload date:
  • Size: 174.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for hydropandas-0.14.0.tar.gz
Algorithm Hash digest
SHA256 38702d097b7acd898da70e871d4b860bc6b9446208ec81f54169bb3f548bfaf6
MD5 885ea5bd920130f1807b0dffe76bf4ac
BLAKE2b-256 7da858ad4d24de826a0c349d40efc17affa244c7a584bfaac7635afcf2de79c6

See more details on using hashes here.

File details

Details for the file hydropandas-0.14.0-py3-none-any.whl.

File metadata

  • Download URL: hydropandas-0.14.0-py3-none-any.whl
  • Upload date:
  • Size: 173.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for hydropandas-0.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 37f4c008618418db5949ac575e6b29f96055d656ab86117ec343afadca864f0b
MD5 62b001dab6819a20475718d85e7a99e6
BLAKE2b-256 6c1f33c4e2531e05ecd80930531f0ce1377453f829e7077e67db0d918780ee5c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page