rdwd is an R package to select, download and read climate data from the
German Weather Service (Deutscher Wetterdienst, DWD).
The DWD provides thousands of datasets with weather observations online at
Since May 2019,
rdwd also supports reading the Radolan (binary) raster data at
A vignette with more information, examples, use cases and an interactive map of the DWD stations can be found at https://bookdown.org/brry/rdwd
Usage for observational weather data from the measuring stations usually looks something like the following:
# Download and install (once only): install.packages("rdwd") # Load the package into library (needed in every R session): library(rdwd) # select a dataset (e.g. last year's daily climate data from Potsdam City): link <- selectDWD("Potsdam", res="daily", var="kl", per="recent") # Actually download that dataset, returning the local storage file name: file <- dataDWD(link, read=FALSE) # Read the file from the zip folder: clim <- readDWD(file, varnames=TRUE) # Inspect the data.frame: str(clim)
For data interpolated onto a 1 km raster, including radar data up to the last hour, see the corresponding chapter in the vignette.
If the installed
packageVersion("rdwd") >= 1.2.5, you can simply run
if(!requireNamespace("remotes", quietly=TRUE)) install.packages("remotes") remotes::install_github("brry/rdwd", build_vignettes=TRUE)
Suggested (not mandatory) dependencies:
RCurlfor indexFTP and selectDWD(..., current=TRUE)
data.tablefor readDWD(..., fread=TRUE)
dwdradarfor readDWD with gridded data
readrfor readDWD.stand(..., fast=TRUE)
testthatfor recreating the vignette and local testing
OSMscalefor interactive/static maps, see OSMscale installation tips
Note: on Linux (Ubuntu), install
RCurl via the terminal (CTRL+ALT+T, note lowercase rcurl):
sudo apt install r-cran-rcurl
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.