Socket
Book a DemoInstallSign in
Socket

hydropandas

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hydropandas

Module by Artesia for loading observation data into custom DataFrames.

pipPyPI
Version
0.12.5
Maintainers
2
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).

sourceobservationsAPI availablelocation
BROGroundwaterBRONetherlands
KNMIMeteorologicalKNMINetherlands
Lizard (Vitens)GroundwaterLizardNetherlands (Vitens)
Lizard (Rotterdam)GroundwaterLizardRotterdam
WaterconnectGroundwaterWaterconnectSouth Australia
WaterinfoSurface water quantity and qualityWaterinfoNetherlands

Some sources also provide files readable by HydroPandas.

sourceobservationsfile formatlocation
BROGroundwaterxmlNetherlands
DINOGroundwater / surface watercsvNetherlands
FEWSGroundwater / surface waterxmlNetherlands
KNMIMeteorologicaltxtNetherlands
PastastoreTime series modelsNANA
WaterinfoSurface water quantity and qualitycsv / zipNetherlands
Wiski (no docs available)GroundwatercsvNetherlands

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

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.