Learn R Programming

rdwd (version 1.1.0)

nearbyStations: Find DWD stations close to given coordinates

Description

Select DWD stations within a given radius around a set of coordinates

Usage

nearbyStations(lat, lon, radius, res = NA, var = NA, per = NA,
  mindate = NA, hasfileonly = TRUE,
  statname = "nearbyStations target location", quiet = FALSE, ...)

Arguments

lat

Coordinates y component [degrees N/S, range 47:55]

lon

Coordinates x component [degrees E/W, range 6:15]

radius

Maximum distance [km] within which stations will be selected

res, var, per

Restrictions for dataset type as documented in selectDWD. Each can be a vector of entries. DEFAULTS: NA (ignored)

mindate

Minimum dataset ending date (as per metadata). Integer in the form of YYYYMMDD, e.g. 20170301. DEFAULT: NA

hasfileonly

Logical: only return entries for which there is an open-access file available? DEFAULT: TRUE

statname

Character: name for target location. DEFAULT: "nearbyStations target location"

quiet

Logical: suppress progress messages? DEFAULT: FALSE

Further arguments passed to selectDWD

Value

metaIndex subset with additional columns "dist" and "url"

See Also

selectDWD, metaIndex

Examples

Run this code
# NOT RUN {
m <- nearbyStations(49.211784, 9.812475, radius=30,
    res=c("daily","hourly"), var= c("precipitation","more_precip","kl") ,
    mindate=20160530, statname="Braunsbach catchment center")
# View(m)
    
# see the use cases vignette for a continued example of this:
vignette("cases")

# }

Run the code above in your browser using DataLab