Skip to main content

Service from Rijkswaterstaat for distributing water quantity data.

Project description

ddlpy

(D)ata (D)istributie (L)aag is a service from Rijkswaterstaat for distributing water quantity data. This package provides an API for python.

pypi-image

image

Documentation Status

Updates

Service from Rijkswaterstaat for distributing water quantity data.

See also https://github.com/wstolte/rwsapi for the R API.

Install

Make sure you have installed:

  • pandas
  • numpy
  • click
  • python-dateutil>=2.8

To install this ddlpy, go to the directory where this code is located and type in a console:

pip install ddlpy

In the folder examples you will find the following files:

  • 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.

This code is parallelized; therefore, you can specify the number of processors you want to use.

The output of this code is the data in csv format.

  • 2_get_netcdf.py -> Code to transform the csv files run in the previous script into netcdf files.

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:

    ddlpy locations

To get access to the help menu, type in a terminal: ddlpy locations --help.

  • Obtain measurements from json file containing locations and codes:

    ddlpy measurements

To get access to the help menu, type in a terminal: ddlpy measurements --help.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rws-ddlpy-0.1.0.tar.gz (34.7 kB view hashes)

Uploaded Source

Built Distribution

rws_ddlpy-0.1.0-py2.py3-none-any.whl (23.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page