ropensci / taxizedb

Tools for Working with Taxonomic SQL Databases
Other
30 stars 7 forks source link

Can't download ITIS db #59

Closed juanmayorgahenao closed 2 years ago

juanmayorgahenao commented 2 years ago
Session Info ```r R version 4.2.0 (2022-04-22) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Monterey 12.4 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] stats graphics grDevices utils datasets methods base other attached packages: [1] bdc_1.1.1 lubridate_1.8.0 ggspatial_1.1.5 forcats_0.5.1 stringr_1.4.0 dplyr_1.0.9 purrr_0.3.4 [8] readr_2.1.2 tidyr_1.2.0 tibble_3.1.7 ggplot2_3.3.6 tidyverse_1.3.1 sf_1.0-7 raster_3.5-15 [15] sp_1.4-7 loaded via a namespace (and not attached): [1] colorspace_2.0-3 ellipsis_0.3.2 class_7.3-20 rgdal_1.5-30 [5] rprojroot_2.0.3 snakecase_0.11.0 fs_1.5.2 rstudioapi_0.13 [9] proxy_0.4-26 scico_1.3.0 bit64_4.0.5 DT_0.23 [13] fansi_1.0.3 rgnparser_0.2.5.91 xml2_1.3.3 codetools_0.2-18 [17] doParallel_1.0.17 contentid_0.0.15 cachem_1.0.6 knitr_1.39 [21] jsonlite_1.8.0 broom_0.8.0 dbplyr_2.2.0 rgeos_0.5-9 [25] oai_0.3.2 hoardr_0.5.2 compiler_4.2.0 httr_1.4.3 [29] backports_1.4.1 assertthat_0.2.1 fastmap_1.1.0 lazyeval_0.2.2 [33] cli_3.3.0 duckdb_0.3.2-2 htmltools_0.5.2 prettyunits_1.1.1 [37] tools_4.2.0 gtable_0.3.0 glue_1.6.2 rappdirs_0.3.3 [41] Rcpp_1.0.8.3 cellranger_1.1.0 CoordinateCleaner_2.0-20 vctrs_0.4.1 [45] conditionz_0.1.0 iterators_1.0.14 xfun_0.31 rvest_1.0.2 [49] lifecycle_1.0.1 sys_3.4 terra_1.5-21 scales_1.2.0 [53] vroom_1.5.7 hms_1.1.1 parallel_4.2.0 taxizedb_0.3.0 [57] qs_0.25.3 yaml_2.3.5 curl_4.3.2 memoise_2.0.1 [61] geosphere_1.5-14 taxadb_0.1.5 stringi_1.7.6 RSQLite_2.2.14 [65] foreach_1.5.2 e1071_1.7-9 rgbif_3.7.2 measurements_1.4.0 [69] rlang_1.0.2 pkgconfig_2.0.3 evaluate_0.15 lattice_0.20-45 [73] htmlwidgets_1.5.4 bit_4.0.4 tidyselect_1.1.2 here_1.0.1 [77] plyr_1.8.7 magrittr_2.0.3 R6_2.5.1 generics_0.1.2 [81] DBI_1.1.2 arkdb_0.0.15 pillar_1.7.0 haven_2.5.0 [85] whisker_0.4 withr_2.5.0 units_0.8-0 janitor_2.1.0 [89] modelr_0.1.8 crayon_1.5.1 uuid_1.1-0 KernSmooth_2.23-20 [93] utf8_1.2.2 RApiSerialize_0.1.0 rmarkdown_2.14 tzdb_0.3.0 [97] progress_1.2.2 rnaturalearth_0.1.0 grid_4.2.0 readxl_1.4.0 [101] data.table_1.14.2 blob_1.2.3 reprex_2.0.1 digest_0.6.29 [105] classInt_0.4-3 openssl_2.0.2 RcppParallel_5.1.5 munsell_0.5.0 [109] stringfish_0.15.7 askpass_1.1 ```

Hi - I can't seem to download the ITIS db using taxizedb::db_download_itis(). I get the following error message: Error in curl::curl_download(db_url, db_path, quiet = TRUE) : transfer closed with 115534120 bytes remaining to read Seems like the error is with curl but I figured I posted this here in case anyone here has run into the same issue.

I tried dowloading the sqlite file directly from ITIS but then I get this error when I try to use it with taxizedb Error: database disk image is malformed.

Any help would be much appreciated.

Thank you!

sckott commented 2 years ago

its due to ITIS servers being very very slow - just tried downloading the SQLite file in a browser and it took probably 30 min and it's only 185 mb, and I have a fast connection.

unless you really want to do SQL queries against the data, perhaps you can try https://cloud.r-project.org/web/packages/taxadb/ which I think has itis

juanmayorgahenao commented 2 years ago

much appreciated @sckott. I downloaded the file with a browser in a reasonable amount of time. Do you have any thoughts on how to fix the error Error: database disk image is malformed when I try to use this file?

sckott commented 2 years ago

the file is corrupted. it's a USGS problem. sorry, can't help. you could contact them

juanmayorgahenao commented 2 years ago

Thanks @sckott. Will do