Skip to contents

Read data from DWD, mask region with given shape file or spatial object

Usage

read_data_over_shape(
  resolution,
  file,
  variable,
  from,
  to,
  quiet = FALSE,
  shape = NULL,
  use_sf = TRUE,
  ...
)

Arguments

resolution

one of "daily", "monthly"

file

path to shape file .shp

variable

currently, the following variables are supported: "evapo_p", "evapo_r", "frost_depth", "soil_moist", "soil_temperature_5cm" (daily), "evapo_p" (monthly)

from

first month as "yyyymm" string

to

last month as "yyyymm" string

quiet

passed to download.file

shape

object of class sf or sf_layers or SpatialPolygonsDataFrame. If NULL (the default), this object is obtained by calling kwb.dwd:::read_shape_file on file.

use_sf

passed to kwb.dwd:::read_shape_file if applicable

...

further arguments passed to kwb.dwd:::read_shape_file, such as drop_z = TRUE, if applicable

Value

data frame