Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatiblity with pastas Python package #16

Open
stijnvanhoey opened this issue Sep 11, 2017 · 2 comments
Open

Compatiblity with pastas Python package #16

stijnvanhoey opened this issue Sep 11, 2017 · 2 comments
Labels
docs Documentation

Comments

@stijnvanhoey
Copy link
Collaborator

Pastas is an open-source framework for the analysis of hydrological time series, http://pastas.readthedocs.io/en/latest/.

Not a priority, but interesting to log here that it could be worthwhile to provide compatibility in the future. By providing the mapping to the pastas datamodel, the modelling tools developed in pastas would be applicable. As the modelling part is out of scope of this package, both packages are complimentary to each other.

(getting this from earlier correspondence from Pieter Jan Haest)

@stijnvanhoey
Copy link
Collaborator Author

After a quick check, the integration with pastas for water head measurements is technically trivial as pastas works with Pandas.Series objects:

Hence, starting from data (df) retrieved using pydov

from owslib.fes import PropertyIsEqualTo
from pydov.search.grondwaterfilter import GrondwaterFilterSearch

gwfilter = GrondwaterFilterSearch()

query = PropertyIsEqualTo(
            propertyname='pkey_filter',
            literal='https://www.dov.vlaanderen.be/data/filter/1992-011802')

df = gwfilter.search(query=query)
df.head()

Converting the time series to a pastas Timeseries:

gwdata = ps.TimeSeries(df["peil_mtaw"], name="Groundwater Level",  fill_nan="drop")

the resulting gwdata object can be further adapted using the pastas defined methods or used as the input of a pastas model. Note, you can also directly feed a Pandas.Series object into a pasta model definition.

Something to integrate in the docs.

@Roel Roel added docs Documentation and removed enhancement labels Jan 31, 2019
@pjhaest
Copy link
Collaborator

pjhaest commented Jan 27, 2020

could be included in the docs, e.g. a Notebook with possible extensions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation
Projects
None yet
Development

No branches or pull requests

3 participants