Page tree
Skip to end of metadata
Go to start of metadata

R is a programming language and free software environment for statistical computing and graphics supported by the R Foundation for Statistical Computing.

The R WaterML library is a software package made by Jiri Kadlec that can be used by developers to access to WHOS functionalities from their R applications.

You can find here the official homepage of R WaterML library.

With Google Colab and Jupyter notebook web applications is possible to live demonstrate on the web how such a library can be used from a sample R script. Here are the online links:

WaterML_1.7.1.tar.gzWHOS-Plata-INA.ipynbWHOS-Arctic-SYKE.ipynb

1) Download the above WaterML R library and the Python notebooks you are interested to try in a local folder.

2) Install Docker

3) From that folder, issue the following command to start the Jupyter Notebook as a localhost service.

docker run --rm -p 8888:8888 -e JUPYTER_ENABLE_LAB=yes -v "$PWD":/home/jovyan/work/ jupyter/r-notebook

4) Read carefully the logs to findout the URL to use in the browser to acces the web GUI. This will be something like:

http://127.0.0.1:8888/?token=my_generated_token

5) Enter the work directory from the left side panel.

6) Open one of the notebook available clicking on the file icon on the left (e.g. WHOS-Plata-INA): the script, along with results and comments should shown in the main panel.

7) Click on Run → Run All Cells to execute the R code on the fly. The first cells will install the provided R WaterML package.

Then, using methods made available by the library, it is shown how it is possible to search and access data from one of the available views of WHOS.


In particular data from a station managed by INA is finally plotted. Of course this is just a quick sample. An hydrologist could of course expand example given doing further data gathering from the different providers participating in WHOS and then do comprehensive analyse.



  • No labels