ropensci / rgbif

Interface to the Global Biodiversity Information Facility API
https://docs.ropensci.org/rgbif
Other
155 stars 50 forks source link

Suggestion to output tsv with scientificName match for taxonkey query #687

Closed Erythroxylum closed 1 year ago

Erythroxylum commented 1 year ago

Hello, I am working with large species lists with taxonomic names resolved by the taxonomic name resolution service, but there are differences from the GBIF backbone and the data I have received from occ_download() includes some synonymization and also returns all species for some higher level taxa (I will add this as separate issue).

Here, I would like to suggest a function that can input an integer of taxonKeys (as with occ_download) and output the list of matched scientificNames.

This new list can then be reviewed to identify taxonomic problems before proceeding with occ_download or other functions.

Thank you.

R version 4.2.0 (2022-04-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.6

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] CoordinateCleaner_3.0.1 devtools_2.4.5         
 [3] usethis_2.1.6           readr_2.1.2            
 [5] geodata_0.5-9           terra_1.7-55           
 [7] rgbif_3.7.8             rmapshaper_0.4.6       
 [9] elevatr_0.4.2           rgdal_1.6-5            
[11] tmap_3.3-3              spData_2.2.2           
[13] dplyr_1.1.3             raster_3.6-20          
[15] sf_1.0-14               reshape2_1.4.4         
[17] RColorBrewer_1.1-3      ggplot2_3.4.4          
[19] sp_2.1-1                vcfR_1.12.0            
[21] pegas_1.1               ape_5.6-2              
[23] hierfstat_0.5-11        adegenet_2.1.7         
[25] ade4_1.7-19            

loaded via a namespace (and not attached):
  [1] lwgeom_0.2-11       plyr_1.8.9          igraph_1.3.1       
  [4] modEvA_3.9.3        lazyeval_0.2.2      splines_4.2.0      
  [7] jqr_1.2.3           crosstalk_1.2.0     leaflet_2.1.2      
 [10] geojsonlint_0.4.0   urltools_1.7.3      digest_0.6.29      
 [13] htmltools_0.5.4     fansi_1.0.5         memoise_2.0.1      
 [16] magrittr_2.0.3      geojsonsf_2.0.3     cluster_2.1.3      
 [19] remotes_2.4.2       tzdb_0.3.0          vroom_1.5.7        
 [22] prettyunits_1.1.1   colorspace_2.1-0    jsonvalidate_1.3.2 
 [25] xfun_0.37           leafem_0.2.0        callr_3.7.3        
 [28] crayon_1.5.1        jsonlite_1.8.7      progressr_0.10.0   
 [31] glue_1.6.2          stars_0.6-0         gtable_0.3.4       
 [34] seqinr_4.2-16       V8_4.2.2            pkgbuild_1.4.0     
 [37] abind_1.4-5         scales_1.2.1        oai_0.4.0          
 [40] DBI_1.1.3           miniUI_0.1.1.1      Rcpp_1.0.11        
 [43] viridisLite_0.4.2   xtable_1.8-4        progress_1.2.2     
 [46] units_0.8-4         bit_4.0.4           proxy_0.4-27       
 [49] profvis_0.3.8       htmlwidgets_1.6.1   httr_1.4.7         
 [52] geosphere_1.5-18    wk_0.9.0            ellipsis_0.3.2     
 [55] urlchecker_1.0.1    pkgconfig_2.0.3     XML_3.99-0.9       
 [58] farver_2.1.1        utf8_1.2.4          crul_1.4.0         
 [61] tidyselect_1.2.0    labeling_0.4.3      rlang_1.1.1        
 [64] later_1.3.0         tmaptools_3.1-1     cachem_1.0.6       
 [67] munsell_0.5.0       tools_4.2.0         cli_3.6.1          
 [70] generics_0.1.3      fuzzySim_4.10.5     evaluate_0.15      
 [73] stringr_1.5.0       fastmap_1.1.0       processx_3.8.1     
 [76] leafsync_0.1.0      knitr_1.39          bit64_4.0.5        
 [79] fs_1.5.2            purrr_1.0.2         s2_1.1.4           
 [82] nlme_3.1-157        whisker_0.4.1       mime_0.12          
 [85] xml2_1.3.5          compiler_4.2.0      rstudioapi_0.13    
 [88] curl_5.1.0          png_0.1-8           e1071_1.7-13       
 [91] tibble_3.2.1        stringi_1.7.12      ps_1.7.0           
 [94] highr_0.9           desc_1.4.1          memuse_4.2-1       
 [97] lattice_0.20-45     Matrix_1.4-1        classInt_0.4-10    
[100] vegan_2.6-2         permute_0.9-7       vctrs_0.6.4        
[103] slippymath_0.3.1    pillar_1.9.0        lifecycle_1.0.3    
[106] triebeard_0.4.1     data.table_1.14.8   geojsonio_0.11.0   
[109] httpuv_1.6.5        R6_2.5.1            promises_1.2.0.1   
[112] KernSmooth_2.23-20  sessioninfo_1.2.2   codetools_0.2-18   
[115] dichromat_2.0-0.1   pkgload_1.3.2       MASS_7.3-57        
[118] rprojroot_2.0.3     withr_2.5.2         pinfsc50_1.2.0     
[121] httpcode_0.3.0      rnaturalearth_0.3.4 mgcv_1.8-40        
[124] parallel_4.2.0      hms_1.1.1           geojson_0.3.4      
[127] class_7.3-20        shiny_1.7.1         base64enc_0.1-3    

Erythroxylum commented 1 year ago

I realize this output can be achieved with name_backbone_checklist()