12 - use case: vectorized data

I’ts always good to update before getting started:

rdwd::updateRdwd()
library(rdwd)

Now we’ll just specify some IDs we’re interested in:

ids <-  c(3988, 5559, 2456, 3034, 1964, 4549, 2950, 5419, 2641, 3565)
links <- selectDWD(id=ids, res="daily", var="weather_phenomena", per="h")
phen <- dataDWD(links, dir=locdir())
names(phen) <- substr(names(phen), 54,58) # only IDs (not paths) as name
str(phen, max.level=1)
## List of 10
##  $ 01964:'data.frame':   21185 obs. of  13 variables:
##  $ 02456:'data.frame':   23192 obs. of  13 variables:
##  $ 02641:'data.frame':   6301 obs. of  13 variables:
##  $ 02950:'data.frame':   16346 obs. of  13 variables:
##  $ 03034:'data.frame':   20945 obs. of  13 variables:
##  $ 03565:'data.frame':   19336 obs. of  13 variables:
##  $ 03988:'data.frame':   46018 obs. of  13 variables:
##  $ 04549:'data.frame':   12199 obs. of  13 variables:
##  $ 05419:'data.frame':   10683 obs. of  13 variables:
##  $ 05559:'data.frame':   17713 obs. of  13 variables:

All further analysis can now be done on this named list.