Package: hydropandas
HydroPandasHydropandas is a Python package for reading, analyzing and writing
(hydrological) timeseries data.IntroductionThe 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:BRODINOFEWS PI-XMLKNMIMODFLOW groundwater modelsIMOD groundwater modelsPastastorewaterinfoWISKI csv filesInstallInstall the module with pip:pip install hydropandasHydroPandas requirespandas,scipy,matplotlib,tqdm,requestsandcolorama.For some functionality additional packages are required:geopandas: for dealing with shapefilespastastore: for reading or storing data from PastaStorebokeh,branca,folium: for interactive mapsflopy: for reading data from MODFLOW modelsxarray: for loading data from REGISFor installing in development mode, clone the repository and install by
typingpip install -e .from the module root directory.
For installing all the optional packages usepip install -e .[full].Get in touchQuestions on HydroPandas ("How can I?") can be asked and answered onGithub Discussions.Bugs, feature requests and other improvements can be posted asGithub Issues.Find out how to contribute to HydroPandas at ourContribution page.ExamplesImporting a groundwater time series from the BRO using the BRO-id and the tube number:importhydropandasashpdgw_bro=hpd.GroundwaterObs.from_bro("GMW000000041261",1)Or import all groundwater time series from the BRO within a certain extent:oc=hpd.read_bro(extent=(117850,118180,439550,439900))The Obs classThe 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 measurementsWaterQualityObs: for groundwater quality measurementsWaterlvlObs: for surface water level measurementsModelObs: for "observations" from a MODFLOW modelMeteoObs: for meteorological observationsPrecipitationObs: for precipitation observations, subclass of MeteoObsEvaporationObs: for evaporation observations, subclass of MeteoObsEach 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 classThe 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.AuthorsOnno Ebbens, ArtesiaRuben Caljé, ArtesiaDavíd Brakenhoff, ArtesiaMartin Vonk, Artesia