-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* improved cli docs * update docs * Bump version: 0.2.1 → 0.3.0
- Loading branch information
1 parent
d244611
commit c423758
Showing
13 changed files
with
98 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[bumpversion] | ||
current_version = 0.2.1 | ||
current_version = 0.3.0 | ||
commit = True | ||
tag = True | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,53 @@ | ||
# ddlpy | ||
|
||
[![pypi-image](https://img.shields.io/pypi/v/ddlpy.svg)](https://pypi.python.org/pypi/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/ddlpy.svg)](https://pypi.org/project/ddlpy) | ||
[![Downloads](https://img.shields.io/pypi/dm/ddlpy.svg)](https://pypistats.org/packages/ddlpy) | ||
|
||
(D)ata (D)istributie (L)aag is a service from Rijkswaterstaat for distributing water quantity data. This package provides an API for python. | ||
# ddlpy | ||
|
||
Documentation: <https://deltares.github.io/ddlpy> | ||
(D)ata (D)istributie (L)aag is a service from Rijkswaterstaat for distributing water quantity data. This package provides an API for python. | ||
|
||
See also https://github.com/wstolte/rwsapi for the R API. | ||
|
||
|
||
# Install | ||
|
||
This text will be updated soon and a new pypi release will also happen soon. | ||
The latest ddlpy PyPI release is outdated, but it can be installed with: | ||
If you had ddlpy installed before please uninstall it first, since the package was renamed from rws-ddlpy to ddlpy on PyPI: | ||
|
||
pip uninstall rws-ddlpy -y | ||
|
||
pip install rws-ddlpy | ||
Install the latest ddlpy PyPI release with (extra dependencies between `[]` are optional): | ||
|
||
The newest version is currently installed directly from github with: | ||
pip install ddlpy[netcdf,examples] | ||
|
||
pip install git+https://github.com/deltares/ddlpy | ||
# Examples | ||
|
||
Documentation: <https://deltares.github.io/ddlpy> | ||
|
||
In the folder examples you will find the following files: | ||
In the examples/notebooks folders you will find the following examples to get you started: | ||
|
||
* minimal example.py -> minimal code to retrieve data. | ||
* [minimal_example.py](https://github.com/Deltares/ddlpy/blob/main/examples/minimal_example.py) -> minimal code to retrieve data. | ||
|
||
* 1_get_data_from_water_info_parallel.py -> Code to retrieve a bulk of observations per parameter and per station. | ||
* [retrieve_parallel_to_netcdf.py](https://github.com/Deltares/ddlpy/blob/main/examples/retrieve_parallel_to_netcdf.py) -> Code to retrieve a bulk of observations and write to netcdf files for each station. | ||
|
||
The output of this code is the data in csv format. | ||
* [measurements.ipynb](https://github.com/Deltares/ddlpy/blob/main/notebooks/measurements.ipynb) -> interactive notebook to subset/inspect locations and download/plot measurements | ||
|
||
* 2_get_netcdf.py -> Code to transform the csv files run in the previous script into netcdf files. | ||
* [waterinfo.ipynb](https://github.com/Deltares/ddlpy/blob/main/notebooks/waterinfo.ipynb) -> interactive notebook to read csv's obained from waterinfo.rws.nl | ||
|
||
More detailed explanation on the usage of these codes are inside the `notebooks` directory. | ||
|
||
# Run ddlpy from console | ||
|
||
You can also run ddlpy from the console. The options you can use are the following: | ||
* Write locations metadata to output file, given input station codes and parameter codes: | ||
With `ddlpy locations` you can generate a (subsetted) locations.json file, for instance: | ||
|
||
ddlpy locations | ||
ddlpy locations --quantity WATHTE --station HOEKVHLD | ||
|
||
To get access to the help menu, type in a terminal: ddlpy locations --help. | ||
With `ddlpy measurements` you can obtain measurements for locations/parameters in an existing locations.json, for instance: | ||
|
||
* Obtain measurements from json file containing locations and codes: | ||
ddlpy measurements 2023-01-01 2023-01-03 | ||
|
||
ddlpy measurements | ||
|
||
To get access to the help menu, type in a terminal: ddlpy measurements --help. | ||
# Something broke? | ||
|
||
IMPORTANT: You can not run `ddlpy measurements` before running `ddlpy locations`, unless you already have a .json file listing the stations and the parameters you need data from. | ||
Check the [status of the DDL](https://rijkswaterstaatdata.nl/waterdata/#hfd2f5e23-5092-4169-9f36-41e9734e7d87) (at the *Updates* heading). If you have a suggestion or found a bug in ddlpy, please [create an issue](https://github.com/Deltares/ddlpy/issues). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
|
||
__author__ = """Fedor Baart""" | ||
__email__ = '[email protected]' | ||
__version__ = '0.2.1' | ||
__version__ = '0.3.0' | ||
|
||
from ddlpy.ddlpy import locations | ||
from ddlpy.ddlpy import (measurements, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ ddlpy.cli module | |
:undoc-members: | ||
:show-inheritance: | ||
|
||
|
||
ddlpy module | ||
--------------- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.