knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  message = FALSE,
  warning = FALSE,
  error   = FALSE
)
library(opendap.catalog)
library(zonal)
(cat = search('terraclim')[1:6,])
AOI = AOI::aoi_get(state = "TX", county = "all")
plot(AOI$geometry)
system.time({
  dap <- dap(
    catolog = cat,
    AOI = AOI,
    startDate = "2005-01-01" )
})
system.time({
  multi_var = execute_zonal(file = dap, AOI, "fip_code")
})
plot(multi_var[grepl(paste(names(dap), collapse = "|"), names(multi_var))],
     border = NA)

Through time

system.time({
  (dap <- dap(
    catolog = cat[4,],
    AOI = AOI,
    startDate = "2005-01-01",
    endDate   = "2005-12-01"
  ))
})
system.time({
  time_ex = execute_zonal(file = dap, AOI, "fip_code")
})

```r plot(time_ex[grepl(paste(names(dap), collapse = "|"), names(time_ex))], border = NA)



mikejohnson51/opendap.catalog documentation built on Jan. 27, 2023, 1:25 a.m.