README.md

Features

Installation

You have to clone the repository using a command line/terminal,

git clone https://gitlab.com/theGreatWhiteShark/dwd2r

open a R shell in the newly created folder,

cd dwd2r
R

and install the package using the devtools package.

devtools::install()

Usage

The main interface to the package is the dwd.download function. You can either use it interactively by calling

dwd.download()

or by supplying your choices in the selection as a function argument. E.g., the following call will download and convert the aggregated, daily observation data for all stations within Germany.

dwd.download( batch.choices = c( 1, 1, 5, 1 ) )

NOTE: For now the internal functions handling the conversion of the data have been only tested for this particular choice of data. It might fail with a different set of choices.

Once you downloaded some data, you can load them into R using either the load() function directly or by

source.data()

This function will list all .RData files in your download directory, displays them and their size in your command line, and let's you choose one of the files using a command line user interface.

Customization

Per default all data downloaded via the dwd2r package will be stored in the R/dwd_data directory in your home. If you want to change this behavior, you can hand over a string specifying the path to your favored destination using the download.folder argument of the dwd.download() and source.data() function.

As an alternative you can also overwrite the global option dwd2r uses to store its download path in. Just add the following lines to the .Rprofile file in your home directory.

options( dwd2r.download.path = "PATH" )

All downloads will now be stored in the PATH directory.

For a more thorough introduction into the dwd2r package please see its vignette.

License (source code & package)

This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 3, as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.

A copy of the GNU General Public License, version 3, is available at http://www.r-project.org/Licenses/GPL-3

License (remote data)

The terms of usage of the data provided by the German weather service are included in German and in English.



theGreatWhiteShark/dwd2r documentation built on May 22, 2019, 2:26 p.m.