Re-structuring data from different databases into a panel

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

jason_ll
Posts: 43
Joined: Thu Sep 01, 2011 11:38 am

Re-structuring data from different databases into a panel

Postby jason_ll » Thu Sep 21, 2017 7:17 pm

Hello,
I've been trying to get this working, with no success. I've read this forum thread:
viewtopic.php?t=74
and still no help, because the data I'm working with is a bit special.

So here's what the data I have look like:

1. I have several EVIews (.edb) databases.

2. Each one, contains several variables in an undated/unstructured form.

3. One of the variables in each database is a character, called "customer". This contains the customer name. There's also a variable called "date", which contains information about the date, which is daily, in the format: "09/20/2017". Each database has data from one date/day.

So I'd like to import all these data and merge them, using the "customer" and "date" variables.

I've tried doing in many ways, but nothing works. Please help.

jason_ll
Posts: 43
Joined: Thu Sep 01, 2011 11:38 am

Re: Re-structuring data from different databases into a panel

Postby jason_ll » Thu Sep 21, 2017 8:47 pm

Ok, one thing that seems to work:

1. Create a new workfile (unstructured)
2. Fetch the data from the first database (still, unstructured).
3. Create a second workfile (unstructured)
4. Fetch the data from the second database (still unstructured)
5. Append the data from the second workfile into the first workfile
6. Repeat steps 4 and 5 until all databases are appended into the same workfile
7. Restructure the workfile as a panel using the time/cross-section identifiers.

It seems to work. But given the number of workfiles I have to open and close, it is time-consuming and not elegant at all.

Anything that beats the above solution?

Thanks!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13294
Joined: Tue Sep 16, 2008 5:38 pm

Re: Re-structuring data from different databases into a panel

Postby EViews Gareth » Thu Sep 21, 2017 8:47 pm

Bring them all into one page, then structure by those two series
Follow us on Twitter @IHSEViews

jason_ll
Posts: 43
Joined: Thu Sep 01, 2011 11:38 am

Re: Re-structuring data from different databases into a panel

Postby jason_ll » Thu Sep 21, 2017 9:46 pm

That would be more elegant than creating a new workfile for each one. But is there a way I can append directly from a database into a page? When I try to import data into a page, it tends to overwrite existing data, instead of appending them.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 11 guests