ropensci/tidync

Plotting multidimensional time series data as a new user following tutorial

evelynstrombom opened this issue · 1 comments

In the tutorial on https://ropensci.org/blog/2019/11/05/tidync/,

#slicing into multidimensional time series
tos <- tidync(system.file("nc/tos_O1_2001-2002.nc", package = "stars"))

yields

not a file:
' '
... attempting remote connection
Error in nc_meta.character(...) : NetCDF source cannot be empty string

Session Info

not sure why that is, but you can hit the url directly:

url <- "https://github.com/r-spatial/stars/raw/main/inst/nc/tos_O1_2001-2002.nc"
tf <- file.path(tempdir(), basename(url))
download.file(url, tf, mode = "wb")
tos <- tidync::tidync(tf)

that file is about 3Mb

fwiw, that blog post should have used a pattern like

tosfile <- system.file("nc/tos_O1_2001-2002.nc", package = "stars", mustWork = TRUE)
## proceed only if we found a valid file ...
...