mingjerli / IMFData

An R package for IMF data api
Other
48 stars 18 forks source link

Changed IMF API Dataflow structure #15

Open mitcda opened 7 years ago

mitcda commented 7 years ago

The IMF API Dataflow structure appears to have recently changed, causing the DataflowMethod function to return an empty data frame. Proposed changes reference the changed IMF Dataflow structure.

mingjerli commented 7 years ago

Hi @mitcda , do you mind to provide more detail about why you get an empty data framm so I can reproduce the problem. I can still use the CRAN version of package without any trouble at this time.

mitcda commented 7 years ago

Hi @mingjerli, here's what happens when I run the DataflowMethod and CompactDataMethod functions from the IMFData package on CRAN.

> DataflowMethod()
data frame with 0 columns and 0 rows

And when I run CompactDataMethod with checkquery=TRUE, it returns the following error, which on tracing back, appears due to the DataflowMethod function returning an empty data frame.

> databaseID <- 'IFS'
> startdate='2001-01-01'
> enddate='2016-12-31'
> checkquery = FALSE
> queryfilter <- list(CL_FREQ="", CL_AREA_IFS="GR", CL_INDICATOR_IFS=c("NGDP_EUR","NGDP_XDC"))

> GR.NGDP.query <- CompactDataMethod(databaseID, queryfilter, startdate, enddate, checkquery=TRUE)
Error in CompactDataMethod(databaseID, queryfilter, startdate, enddate,  : 
  databaseID is not exist in API