Closed gabeh73 closed 4 years ago
unction name: meteo_pull_monitors I've been using this function regularly for over a year: Now it is only returning data up until May 15.
Example: cdate<- today()-1 bdate<- today()-56
test7 <- meteo_pull_monitors("USW00003856", keep_flags = FALSE,date_min = bdate, date_max = cdate, var = c("awnd","tavg"))
print(head(test7)) print(tail(test7))
output->
id date awnd tavg
1 USW00003856 2020-04-19 31 119 2 USW00003856 2020-04-20 34 158 3 USW00003856 2020-04-21 36 170 4 USW00003856 2020-04-22 29 143 5 USW00003856 2020-04-23 58 152 6 USW00003856 2020-04-24 24 177
A tibble: 6 x 4 id date awnd tavg
1 USW00003856 2020-05-26 NA NA 2 USW00003856 2020-05-27 NA NA 3 USW00003856 2020-05-28 NA NA 4 USW00003856 2020-05-29 NA NA 5 USW00003856 2020-05-30 NA NA 6 USW00003856 2020-05-31 NA NA
Thanks for your question. Can you try clearing the GHCND cache, then try again.
ghcnd_cache$delete_all()
# try downloading again
You guys are awesome!
I had ghcnd_clear_cache(force=TRUE) in this code before but that started giving me a error message so I ignorantly just commented it out and forgot that it was actually important...
guess that is the new function to replace that?
anyway it works again so THANK YOU!
glad it worked, Yes, ghcnd_clear_cache
was replaced with ghcnd_cache
, this doc page https://docs.ropensci.org/rnoaa/reference/rnoaa_caching.html gives an overview of caching across the package
Session Info
> sessionInfo() R version 3.4.4 (2018-03-15) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Linux Mint 19.1 Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1 locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets [6] methods base other attached packages: [1] rnoaa_1.0.0 readxl_1.3.1 anytime_0.3.7 [4] forcats_0.5.0 stringr_1.4.0 purrr_0.3.4 [7] readr_1.3.1 tidyr_1.0.3 tibble_3.0.1 [10] tidyverse_1.3.0 ggfortify_0.4.10 ggplot2_3.3.0 [13] dplyr_0.8.5 lubridate_1.7.8 loaded via a namespace (and not attached): [1] tidyselect_1.1.0 haven_2.2.0 lattice_0.20-35 [4] colorspace_1.4-1 vctrs_0.3.0 generics_0.0.2 [7] utf8_1.1.4 XML_3.99-0.3 rlang_0.4.6 [10] pillar_1.4.4 httpcode_0.3.0 glue_1.4.1 [13] withr_2.2.0 DBI_1.1.0 rappdirs_0.3.1 [16] dbplyr_1.4.3 modelr_0.1.7 lifecycle_0.2.0 [19] munsell_0.5.0 gtable_0.3.0 cellranger_1.1.0 [22] rvest_0.3.5 curl_4.3 hoardr_0.5.2 [25] fansi_0.4.1 broom_0.5.6 Rcpp_1.0.4.6 [28] backports_1.1.7 scales_1.1.1 jsonlite_1.6.1 [31] fs_1.4.1 gridExtra_2.3 digest_0.6.25 [34] hms_0.5.3 stringi_1.4.6 grid_3.4.4 [37] cli_2.0.2 tools_3.4.4 magrittr_1.5 [40] crul_0.9.0 crayon_1.3.4 pkgconfig_2.0.3 [43] ellipsis_0.3.1 data.table_1.12.8 xml2_1.3.2 [46] reprex_0.3.0 assertthat_0.2.1 httr_1.4.1 [49] rstudioapi_0.11 R6_2.4.1 nlme_3.1-131 [52] compiler_3.4.4 ```r ``` function name: meteo_pull_monitors I've been using this function regularly for over a year: Now it is only returning data up until May 15. Example: cdate<- today()-1 bdate<- today()-56 test7 <- meteo_pull_monitors("USW00003856", keep_flags = FALSE,date_min = bdate, date_max = cdate, var = c("awnd","tavg")) print(head(test7)) print(tail(test7)) output-> id date awnd tavg