Learn R Programming

⚠️There's a newer version (1.8.0) of this package.Take me there.

rdwd

rdwd is an R package to select, download and read climate data from the German Weather Service (Deutscher Wetterdienst, DWD). They provide thousands of datasets with weather observations online at
ftp://opendata.dwd.de/climate_environment/CDC/observations_germany/climate
Since May 2019, rdwd also supports reading the Radolan (binary) raster data at
ftp://opendata.dwd.de/climate_environment/CDC/grids_germany

rdwd is available on CRAN:

It has been presented at FOSDEM 2017 and UseR!2017 in Brussels, featured in Rstudios data package list and written about in OSOR.

Usage of the package usually looks something like the following:

# download and install the rdwd package (only needed once):
install.packages("rdwd")
# if wanted, latest development version, incl. vignettes:
remotes::install_github("brry/rdwd", build_opts="--no-manual")

# 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)

You can also select datasets with the interactive map.
A general introduction to rdwd is available in the package vignette.
Long actual-usage examples can be found in the use cases vignette.

vignette("mapDWD") # interactive map, likely faster than CRAN link above
vignette("rdwd")   # package instructions and examples
vignette("cases")  # longer use case examples

help

I'm looking for someone to help implement multiple downloads in dataDWD via e.g. curl or wget. The requirements are as follows:

  • works cross-platform
  • is called from R
  • has as few dependencies as possible
  • does not fail completely at a single failure, e.g. can be called within try
  • optimally enables a progress bar

Copy Link

Version

Install

install.packages('rdwd')

Monthly Downloads

678

Version

1.1.0

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Berry Boessenkool

Last Published

May 31st, 2019

Functions in rdwd (1.1.0)

createIndex

Create file and meta index of the DWD CDC FTP Server
metaInfo

Information for a station ID on the DWD CDC FTP server
nearbyStations

Find DWD stations close to given coordinates
readDWD.data

read regular dwd data
readDWD.meta

read dwd metadata (Beschreibung*.txt files)
index

Indexes of files and metadata on the DWD CDC FTP server
indexFTP

Create a recursive index of an FTP Server
rdwd

Download Climate Data from DWD (German Weather Service)
readDWD

Process data from the DWD CDC FTP Server
checkIndex

check indexes
DEU

Map of German states (Bundeslaender) from GADM through the raster package
dirDWD

directory management for rdwd
dwdbase

DWD FTP Server base URL
lldist

distance between lat-long coordinates
readVars

Process data from the DWD CDC FTP Server
dwdparams

DWD parameter explanations
newColumnNames

Enhance readDWD column names
localtestdir

local test data directory
projectRasterDWD

project DWD raster data
rowDisplay

Create leaflet map popup from data.frame rows
selectDWD

Select data from the DWD CDC FTP Server
findID

find DWD weather station ID from name
readMeta

Process data from the DWD CDC FTP Server
readRadarFile

read binary radolan radar file
readDWD.binary

read dwd gridded radolan binary data
readDWD.asc

read dwd gridded radolan asc data
release_questions

Reminders when using devtools::release
readDWD.multia

read multi_annual dwd data
readDWD.raster

read dwd gridded raster data
dataDWD

Download data from the DWD CDC FTP Server