Metadata-Version: 2.4
Name: rws-ddlpy
Version: 0.10.0
Summary: Service from Rijkswaterstaat for distributing water quantity data.
Maintainer-email: Fedor Baart <fedor.baart@deltares.nl>, Jelmer Veenstra <jelmer.veenstra@deltares.nl>
License-Expression: GPL-3.0
Project-URL: Home, https://github.com/deltares/ddlpy
Project-URL: Code, https://github.com/deltares/ddlpy
Project-URL: Issues, https://github.com/deltares/ddlpy/issues
Keywords: ddlpy
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.22
Requires-Dist: pandas
Requires-Dist: python-dateutil>=2.8
Requires-Dist: pytz
Requires-Dist: tqdm
Requires-Dist: click
Requires-Dist: requests
Requires-Dist: platformdirs
Provides-Extra: dev
Requires-Dist: bump2version>=0.5.11; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: pytest>=3.8.2; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: flake8>=3.5.0; extra == "dev"
Requires-Dist: tox>=3.5.2; extra == "dev"
Requires-Dist: twine>=1.12.1; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=1.8.1; extra == "docs"
Requires-Dist: sphinx_mdinclude; extra == "docs"
Requires-Dist: nbsphinx; extra == "docs"
Requires-Dist: pydata-sphinx-theme; extra == "docs"
Provides-Extra: examples
Requires-Dist: jupyter; extra == "examples"
Requires-Dist: notebook; extra == "examples"
Requires-Dist: matplotlib; extra == "examples"
Provides-Extra: netcdf
Requires-Dist: xarray; extra == "netcdf"
Requires-Dist: h5netcdf; extra == "netcdf"
Dynamic: license-file

[![pypi-image](https://img.shields.io/pypi/v/rws-ddlpy.svg)](https://pypi.python.org/pypi/rws-ddlpy)
[![pytest](https://github.com/Deltares/ddlpy/actions/workflows/pytest.yml/badge.svg?branch=main)](https://github.com/Deltares/ddlpy/actions/workflows/pytest.yml)
[![codecov](https://img.shields.io/codecov/c/github/deltares/ddlpy.svg?style=flat-square)](https://app.codecov.io/gh/deltares/ddlpy?displayType=list)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Deltares_ddlpy&metric=alert_status)](https://sonarcloud.io/summary/overall?id=Deltares_ddlpy)
[![Supported versions](https://img.shields.io/pypi/pyversions/rws-ddlpy.svg)](https://pypi.org/project/rws-ddlpy)
[![Downloads](https://img.shields.io/pypi/dm/rws-ddlpy.svg)](https://pypistats.org/packages/rws-ddlpy)

# ddlpy

(D)ata (D)istributie (L)aag is a service from Rijkswaterstaat for distributing water quantity data, more information is available at https://rijkswaterstaatdata.nl/waterdata. This package provides an API for Python and includes easy filtering of available data and stations, convenient conversion to pandas and xarray objects, automatic chunking of large data requests, error handling and much more nifty features. See also https://github.com/wstolte/rwsapi for the R API.

# Install

Install the latest ddlpy PyPI release with (extra dependencies between `[]` are optional):

	pip install rws-ddlpy[netcdf,examples]

# Examples

Documentation: <https://deltares.github.io/ddlpy>

In the examples/notebooks folders you will find the following examples to get you started:

* [minimal_example.py](https://github.com/Deltares/ddlpy/blob/main/docs/examples/minimal_example.py) -> minimal code to retrieve data.

* [retrieve_parallel_to_netcdf.py](https://github.com/Deltares/ddlpy/blob/main/docs/examples/retrieve_parallel_to_netcdf.py) -> Code to retrieve a bulk of observations and write to netcdf files for each station.

* [measurements.ipynb](https://github.com/Deltares/ddlpy/blob/main/docs/notebooks/measurements.ipynb) -> interactive notebook to subset/inspect locations and download/plot measurements

* [waterinfo.ipynb](https://github.com/Deltares/ddlpy/blob/main/docs/notebooks/waterinfo.ipynb) -> interactive notebook to read csv's obained from waterinfo.rws.nl


# Run ddlpy from console

With `ddlpy locations` you can generate a (subsetted) locations.json file, for instance:

	ddlpy locations --quantity WATHTE --station hoekvanholland

With `ddlpy measurements` you can obtain measurements for locations/parameters in an existing locations.json, for instance:

	ddlpy measurements 2023-01-01 2023-01-03


# Something broke?

First check the [status of the DDL](https://rijkswaterstaatdata.nl/waterdata/#hfd2f5e23-5092-4169-9f36-41e9734e7d87) (at the *Updates* section). If you found an issue in the data or with the Waterwebservices, please [start a discussion at the Waterwebservices github](https://github.com/Rijkswaterstaat/WaterWebservices/discussions). If you have a suggestion or found a bug in ddlpy, please [create a issue at the ddlpy Github](https://github.com/Deltares/ddlpy/issues).
