trias-project / indicators

đŸ“ˆ Alien species indicators
https://trias-project.github.io/indicators/
MIT License
0 stars 1 forks source link

Preprocessing for occurrence based indicators #99

Closed mvarewyck closed 2 years ago

mvarewyck commented 2 years ago

I tried to retrieve the file "df_timeseries.tsv" created using the Rmd script, but it fails here

Quitting from lines 235-256 (05_occurrence_indicators_preprocessing.Rmd) 
Error in `dplyr::bind_rows()` at purrr/R/map.R:236:2:
! Argument 1 must be a data frame or a named atomic vector.
Backtrace:
 1. ... %>% ...
 6. purrr::map_df(...)
      at tidylog/R/select.R:3:4
 7. dplyr::bind_rows(res, .id = .id)
      at purrr/R/map.R:236:2

I'm also wondering why some interim files are available here and others not? Could you please provide me the file or help to fix the code?

> sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.4 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=en_US.UTF-8          LC_NUMERIC=C                 
 [3] LC_TIME=en_GB.UTF-8           LC_COLLATE=en_US.UTF-8       
 [5] LC_MONETARY=en_GB.UTF-8       LC_MESSAGES=en_US.UTF-8      
 [7] LC_PAPER=en_GB.UTF-8          LC_NAME=en_GB.UTF-8          
 [9] LC_ADDRESS=en_GB.UTF-8        LC_TELEPHONE=en_GB.UTF-8     
[11] LC_MEASUREMENT=en_GB.UTF-8    LC_IDENTIFICATION=en_GB.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] rgbif_3.7.2     lubridate_1.8.0 here_1.0.1      progress_1.2.2 
 [5] tidylog_1.0.2   forcats_0.5.1   stringr_1.4.0   dplyr_1.0.9    
 [9] purrr_0.3.4     readr_2.1.2     tidyr_1.2.0     tibble_3.1.7   
[13] ggplot2_3.3.6   tidyverse_1.3.1 rj_4.0.5-4     

loaded via a namespace (and not attached):
 [1] httr_1.4.3        sass_0.4.1        rj.gd_4.0.5-1     bit64_4.0.5      
 [5] vroom_1.5.7       jsonlite_1.8.0    modelr_0.1.8      bslib_0.3.1      
 [9] assertthat_0.2.1  triebeard_0.3.0   urltools_1.7.3    cellranger_1.1.0 
[13] yaml_2.3.5        pillar_1.7.0      backports_1.4.1   glue_1.6.2       
[17] uuid_1.1-0        digest_0.6.29     rvest_1.0.2       colorspace_2.0-3 
[21] htmltools_0.5.2   plyr_1.8.7        clisymbols_1.2.0  pkgconfig_2.0.3  
[25] oai_0.3.2         httpcode_0.3.0    broom_0.8.0       haven_2.5.0      
[29] scales_1.2.0      whisker_0.4       tzdb_0.3.0        generics_0.1.2   
[33] ellipsis_0.3.2    withr_2.5.0       lazyeval_0.2.2    cli_3.3.0        
[37] magrittr_2.0.3    crayon_1.5.1      readxl_1.4.0      evaluate_0.15    
[41] fs_1.5.2          fansi_1.0.3       xml2_1.3.3        tools_4.1.1      
[45] data.table_1.14.2 prettyunits_1.1.1 hms_1.1.1         lifecycle_1.0.1  
[49] munsell_0.5.0     reprex_2.0.1      compiler_4.1.1    jquerylib_0.1.4  
[53] rlang_1.0.2       grid_4.1.1        conditionz_0.1.0  rstudioapi_0.13  
[57] rmarkdown_2.14    gtable_0.3.0      curl_4.3.2        DBI_1.1.2        
[61] R6_2.5.1          knitr_1.39        bit_4.0.4         fastmap_1.1.0    
[65] utf8_1.2.2        rprojroot_2.0.3   stringi_1.7.6     crul_1.2.0       
[69] parallel_4.1.1    Rcpp_1.0.8.3      vctrs_0.4.1       dbplyr_2.1.1     
[73] tidyselect_1.1.2  xfun_0.31  
damianooldoni commented 2 years ago

Hi @mvarewyck! I am very sorry to not have answered to your question. Thanks for contacting me. Too much work at the moment. I plan to come back to this next Monday, is it ok?

About this:

I'm also wondering why some interim files are available here and others not?

Some files are very big and so I chose to not push on GitHub as they are typically a by product of a workflow.

mvarewyck commented 2 years ago

Thanks @damianooldoni, Monday is fine.

damianooldoni commented 2 years ago

This should be solved by #101. Please, close if you can rerun the updated workflow 5. Thanks.

mvarewyck commented 2 years ago

Thanks, I'm able to run the script now and create the df_timeseries.tsv file