Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imf_data request fails #12

Open
nreigl opened this issue Jun 18, 2018 · 5 comments
Open

imf_data request fails #12

nreigl opened this issue Jun 18, 2018 · 5 comments

Comments

@nreigl
Copy link

nreigl commented Jun 18, 2018

Running the example Simple Country-Time-Variable

library(imfr)

real_ex <- imf_data(database_id = 'IFS', indicator = 'EREER_IX',
                    country = c('CN', 'GB'), freq = 'A',
                    start = 2013, end = current_year())

I get

Downloading: 150 kB     Error: Unable to download series.

Windows sessionInfo()

R version 3.4.4 (2018-03-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=Estonian_Estonia.1257  LC_CTYPE=Estonian_Estonia.1257    LC_MONETARY=Estonian_Estonia.1257 LC_NUMERIC=C                     
[5] LC_TIME=Estonian_Estonia.1257    

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

other attached packages:
[1] imfr_0.1.5

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.17     dplyr_0.7.5      assertthat_0.2.0 R6_2.2.2         jsonlite_1.5     magrittr_1.5     httr_1.3.1       pillar_1.2.3    
 [9] rlang_0.2.1      curl_3.2         bindrcpp_0.2.2   tools_3.4.4      glue_1.2.0       purrr_0.2.5      yaml_2.1.19      compiler_3.4.4  
[17] pkgconfig_2.0.1  bindr_0.1.1      tidyselect_0.2.4 tibble_1.4.2

Running the same code snippet on OSX gives the same error.

OSX sessionInfo()

R version 3.5.0 (2018-04-23)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.5

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/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] imfr_0.1.5

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.17     dplyr_0.7.5      assertthat_0.2.0 R6_2.2.2         jsonlite_1.5     magrittr_1.5     httr_1.3.1       pillar_1.2.3     rlang_0.2.1     
[10] curl_3.2         bindrcpp_0.2.2   tools_3.5.0      glue_1.2.0.9000  purrr_0.2.5      yaml_2.1.19      compiler_3.5.0   pkgconfig_2.0.1  bindr_0.1.1     
[19] knitr_1.20       tidyselect_0.2.4 tibble_1.4.2  

@cjyetman
Copy link
Contributor

IMF's API has substantially changed. This package needs to be updated based on info found here: https://sdmxcentral.imf.org/rest-get.html

@christophergandrud
Copy link
Owner

I was unable to reproduce this problem.

library(imfr)
real_ex <- imf_data(database_id = 'IFS', indicator = 'EREER_IX',
                     country = c('CN', 'GB'), freq = 'A',
                     start = 2013, end = current_year())
  
real_ex

# iso2c year  EREER_IX
# 1     CN 2013 114.63856
# 2     CN 2014 118.34228
# 3     CN 2015 129.93152
# 4     CN 2016 123.62516
# 5     CN 2017 120.07204
# 6     CN 2018 121.68013
# 7     GB 2013 102.05529
# 8     GB 2014 108.71170
# 9     GB 2015 113.73749
# 10    GB 2016 102.36253
# 11    GB 2017  97.07482
# 12    GB 2018  98.82861

@clemdmcl
Copy link

clemdmcl commented Apr 6, 2021

Hi @christophergandrud,

Have you been able to solve your issue? I am having the same problem but the link provided by @cjyetman no longer exists.
I downloaded the package yesterday and it worked fine. The problem Error: Unable to download series. only arose today. (I tried the same code as you). I updated the package by downloading it again, but without success.

@christophergandrud
Copy link
Owner

Thanks for raising the issues @clemdmcl

I was also just now not able to download the series:

library(imfr)
real_ex <- imf_data(database_id = 'IFS', indicator = 'EREER_IX',
                     country = c('CN', 'GB'), freq = 'A',
                     start = 2013, end = current_year())
Downloading: 150 kB     Error: Unable to download series.
Called from: download_parse(URL)
Browse[1]> 
real_ex
Error: object 'real_ex' not found

@clemdmcl
Copy link

clemdmcl commented Apr 8, 2021

Hi @christophergandrud,

thanks for checking, I dont know how this problem could be solved though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants