expersso / BIS

Programmatic access to BIS data
19 stars 10 forks source link

get_bis() gets stuck trying to download LBS, CBS, SEC data sets #2

Open stefanangrick opened 5 years ago

stefanangrick commented 5 years ago

Summary: get_bis() gets stuck trying to download the "Locational banking statistics" (LBS), "Consolidated banking statistics" (CBS) and the "Debt securities statistics" (SEC) from the BIS's homepage.

Steps to reproduce:

library("BIS")
ds  <- get_datasets()

lbs <- get_bis(ds$url[grep("Locational banking statistics", ds$name)])
cbs <- get_bis(ds$url[grep("Consolidated banking statistics", ds$name)])
sec <- get_bis(ds$url[grep("Debt securities statistics", ds$name)])

Expected result: The above calls to get_bis() should run through and assign the downloaded data to the objects before the "<-" operator.

What happened instead: The download starts, showing a progress bar which gradually goes to 100%. After that, nothing happens for an extended period of time. After several minutes of inactivity, the system starts using up larger amounts of CPU resources and RAM, at which point I typically force-quit R/R-Studio.

System information:

sessionInfo()

R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252   
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    

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

other attached packages:
[1] BIS_0.2.1

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.0       rstudioapi_0.8   bindr_0.1.1      xml2_1.2.0       magrittr_1.5    
 [6] hms_0.4.2        tidyselect_0.2.5 rvest_0.3.2      R6_2.3.0         rlang_0.3.0.1   
[11] httr_1.3.1       dplyr_0.7.8      tools_3.5.1      yaml_2.2.0       assertthat_0.2.0
[16] tibble_1.4.2     crayon_1.3.4     bindrcpp_0.2.2   tidyr_0.8.2      purrr_0.2.5     
[21] readr_1.1.1      curl_3.2         glue_1.3.0       compiler_3.5.1   pillar_1.3.0    
[26] pkgconfig_2.0.2 

Thanks for the great package!