Fetching Multiple Series from EIA Online DB

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

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

jaylamb20
Posts: 37
Joined: Mon Mar 17, 2014 10:07 am

Fetching Multiple Series from EIA Online DB

Postby jaylamb20 » Mon Oct 19, 2015 9:09 am

Hello,

I'm having an issue accessing data from the EIA database through EViews. I'm hoping you can replicate it on your end and recommend solutions.

Consider the following short program:

Code: Select all

'Create workfile wfcreate(wf=TEMP, page=DATA_A) a 1990 2020 pagecreate(DATA_Q) q 1990 2020 pagecreate(DATA_M) m 1990 2020 'Fetch fuel price data from EIA for %freq A Q M pageselect DATA_{%freq} fetch(d=EIA) STEO.WTIPUUS.{%freq} STEO.NGHHMCF.{%freq} STEO.NGHHUUS.{%freq} STEO.BREPUUS.{%freq} next
The performance of this program changes every time I run it in EViews. Each time I run it, it breaks at a different point (i.e. on a different series), and gives an error message in the form of "Database Error: data values provided for object...are not in a supported format". I encourage you to try running my short program again 4-5 times and observe the point at which the fetch() command throws an error.

Any thoughts on what could be causing this? I'm perplexed by the fact that the code breaks at a different series in the fetch command each time I run it.

I am running EV9 Enterprise (September 14 2015 build) on Windows 7, and I have the EIA database in my registry with a valid API key.

Thanks,

-James

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: Fetching Multiple Series from EIA Online DB

Postby EViews Jason » Mon Oct 19, 2015 10:02 am

I cannot replicate this bug even after running 10+ times. I am running with the latest patch, but I doubt any fixes since your build would cause this particular behavior.

Can you post screenshot of the error?

I doubt this is the problem but your example should read

Code: Select all

pagecreate(page=DATA_Q) q 1990 2020 pagecreate(page=DATA_M) m 1990 2020

jaylamb20
Posts: 37
Joined: Mon Mar 17, 2014 10:07 am

Re: Fetching Multiple Series from EIA Online DB

Postby jaylamb20 » Mon Oct 19, 2015 10:27 am

Ah, yes, that was a typo on my part. Inconsequential either way.

Here is the error message:

Image

Image link: https://drive.google.com/file/d/0B-aPW_ ... ZSSUk/view

-James

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: Fetching Multiple Series from EIA Online DB

Postby EViews Jason » Mon Oct 19, 2015 10:43 am

Can you try changing your loop to read

Code: Select all

fetch(d=EIA) STEO.WTIPUUS.{%freq} fetch(d=EIA) STEO.NGHHMCF.{%freq} fetch(d=EIA) STEO.NGHHUUS.{%freq} fetch(d=EIA) STEO.BREPUUS.{%freq}
Does this produce more consistent results (meaning does the error now happen on the same series)?

jaylamb20
Posts: 37
Joined: Mon Mar 17, 2014 10:07 am

Re: Fetching Multiple Series from EIA Online DB

Postby jaylamb20 » Mon Oct 19, 2015 11:02 am

When I run the code just as you presented, it fails every time on STEO.NGHHUUS.A.

Oddly enough, if I run the code below with explicit open() and close() commands, the programs makes it a bit farther, erroring out on STEO.BREPUUS.A and even occasionally making it to the Quarterly page before breaking.

Code: Select all

for %freq A Q M pageselect DATA_{%freq} dbopen EIA fetch(d=EIA) STEO.WTIPUUS.{%freq} fetch(d=EIA) STEO.NGHHMCF.{%freq} fetch(d=EIA) STEO.NGHHUUS.{%freq} fetch(d=EIA) STEO.BREPUUS.{%freq} close EIA next

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: Fetching Multiple Series from EIA Online DB

Postby EViews Jason » Mon Oct 19, 2015 11:15 am

I have your email address and will be sending you an email shortly.

jaylamb20
Posts: 37
Joined: Mon Mar 17, 2014 10:07 am

Re: Fetching Multiple Series from EIA Online DB

Postby jaylamb20 » Mon Oct 19, 2015 11:44 am

Sounds good, thank you.

jaylamb20
Posts: 37
Joined: Mon Mar 17, 2014 10:07 am

Re: Fetching Multiple Series from EIA Online DB

Postby jaylamb20 » Wed Oct 21, 2015 7:33 am

For those of you coming to this forum from a search...Jason and I resolved the issue offline. I've been informed that the fix should be in the next EV9 patch.

-James


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests