Error Browsing SDMX IMF, IFS 2021M05

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

JeffvdN
Posts: 18
Joined: Thu Aug 02, 2018 12:18 pm

Error Browsing SDMX IMF, IFS 2021M05

Postby JeffvdN » Wed Aug 11, 2021 10:33 am

I am using the latest Eviews 12. When I browse the SDMX IMF, IFS 2021 M05 database, I am getting a Microsoft .net framework error.
"Unhandled exception has occurred in a component in your application..." see screen capture. Any ideas?

Also, I had trouble finding sample code that would automate the pulling of a list of series from this dataset each week. I found dbopen. I assume it is a fetch command? How do I specify the dataset (ifs 2021 m05) within the SDMX IMF?

eviews_ifs_error.png
eviews_ifs_error.png (46.85 KiB) Viewed 12248 times


Thanks for your help.

EViews Katerina
Posts: 51
Joined: Thu Jun 25, 2015 9:54 am

Re: Error Browsing SDMX IMF, IFS 2021M05

Postby EViews Katerina » Wed Aug 11, 2021 5:02 pm

The latest patch of EViews (Aug 11 2021 build) has the fix on the issue.


This is an example of fetching a series from IMF from dataset ds-ifs_2021m05:

//Open the imf database
dbopen(type=imf, server=http://dataservices.imf.org/rest/sdmx_xml.svc)
//Create a workfile
wfcreate a 2000 2016
//fetch the series from imf
fetch(d=imf) ds-ifs_2021m05__base_year=2010=100.freq=a.indicator=aip_sa_ix.ref_area=in.time_format=p1y.unit_mult=0

JeffvdN
Posts: 18
Joined: Thu Aug 02, 2018 12:18 pm

Re: Error Browsing SDMX IMF, IFS 2021M05

Postby JeffvdN » Thu Aug 19, 2021 1:26 pm

Thanks for your help. Now I am able to get it working but I am still encountering problems. The most significant is that the filters to narrow down on the series tend to get stuck on the second or third filter. This screen capture shows a session where you can see that not all of the filters are working.

eviews_ifs_filter_not_responding.png
eviews_ifs_filter_not_responding.png (45.74 KiB) Viewed 12161 times


Is it timing out?

Also, it would be really nice if wildcards would work.  For example, I would like to pull one concept for all countries.

Then I tried to put the fetch command into a loop and had some trouble.  It seemed to fail on different series every time I ran it.   I found that adding a 3 second sleep command before the fetch and 2 seconds eliminated these fetch errors.  Is it trying to fetch too fast? Shorter pauses may work too.

Am I correct that these\fetch commands to retrieve data from these SDMX databases don't have all of the usual options?  I could not get it to add prefixes or do a rename in the fetch command. Given that these generate ridiculously long series names I would like to be able to do a rename.

Also, is there a way to test if the series exists before fetching to avoid errors?  Something like the @isobect function?

Lastly, is there any documentation for these fetch commands? I am hoping to get this working to download a pretty large number of series, maybe 20 concepts for 45 countries.  I am finding it to be a little frustrating because the different series have slightly different fetch specifications. I have been using the capture feature to see the commands but I am still not sure how to get all of the fetch commands to work without doing each series manually. For example,
- Which ones are mult[list=]=6 or mult=0?
- What does "format_p1m" mean? I get that the M is monthly. What is the p1?
- Why do some fetch co[/list]mmands have have ".sheet" at the end?

Or are these questions for the IFS? If so, do they have documentation?

I am sorry about having so many questions. I appreciate your help.

JeffvdN
Posts: 18
Joined: Thu Aug 02, 2018 12:18 pm

Re: Error Browsing SDMX IMF, IFS 2021M05

Postby JeffvdN » Fri Aug 20, 2021 9:12 am

Also, I just noticed that the latest version of the IMF IFS data set seems to be from May with monthly data through March. (Or am I just not seeing the more recent version?) I have been getting their data using their bulk download feature on their website which is updated weekly (on Mondays) and currently has data through July.

In looking into why this might be, I found this page that may be of interest to you for 2 reasons.
https://datahelp.imf.org/knowledgebase/ ... 630877-api

1) "Please note that the old IMF SDMX web service that was previously available at http://sdmxws.imf.org is no longer supported." Could this be why the datasets are not up to date or is it unrelated?

2) They appear to be throttling the access which could explain why I had to add the sleep commands
"Also, please be aware of the following rate limits and throttle your requests accordingly:
10 requests in 5 second window from one user (IP)
50 requests per second overall on the application"

EViews Steve
EViews Developer
Posts: 788
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: Error Browsing SDMX IMF, IFS 2021M05

Postby EViews Steve » Fri Aug 20, 2021 3:40 pm

JeffvdN:

First, the EViews 12 IMF SDMX Database connector uses the newer SDMX 2.0 Web Service that IMF provides so those warnings about the older sdmx interface don't apply.

Next, I noticed that a lot of the delays come from our controls attempt to display a list of series for the currently selected filter. If you see a "Please wait" popup saying it's retrieving series, you can safely cancel those and then immediately select the next filter criteria. That's why the cancel button is there.

Wildcards cannot be supported because that is a function of their web service and I don't believe they provide that functionality. However, I do think we could add the ability to type in a specific dataset name at the beginning of the filter screen, so you can jump to a specific one without having to go thru the normal filters first.

About retrieving the same concept for all countries, the fastest way to do that would be to get a list of country codes from IMF, retrieve a single concept for one of the countries, then copy and paste the command into multiple FETCH lines while only changing the country code in the name. If you have all the country codes in a separate string, you could loop thru each name and fetch as well.

And while you're at it, you might as well rename the long names we generate into something more readable for yourself by following the instructions from these postings:
Fetch & Rename
Rename multiple series using string functions

There isn't a way to test an object exists before calling FETCH. However, you can increase the number of allowed errors in running a program to allow it skip over any that don't exist and continue running. Use SETMAXERRS command at the start of your program.

About your questions regarding mult=6 vs mult=0 and format_p1m, those parts of the object name is our attempt to store the required filter parameters we need to send to the IMF service to re-retrieve that dataset. We derive those values from IMF itself so we don't have any additional meta-data that explains what those values mean. You would have to look in the IMF website for more details on those.

Finally, if you can find an example of a particular dataset that seems to be missing data compared to the bulk download file, please give the exact name of the dataset so we can look at it ourselves. One thing to note about this, make sure that your destination workfile has the appropriate date ranges before you attempt to FETCH the data, as a FETCH does not resize your workfile.

Steve


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 12 guests