name, label and description of series

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

Katjes
Posts: 58
Joined: Thu Oct 02, 2008 5:46 am

name, label and description of series

Postby Katjes » Mon Jun 06, 2011 9:35 am

In a Excel file I have a bunch of information well prepared for my time series, however, how can I import all this information to EViews (7.2)?
Assume a column were you have the shortname, longname (for charts and tables), description (e.g. Source,etc.) and then the values
e.g. in Excel it looks like this

gdp_sa
GDP
GDP, chain-linked, 2000, Eurostat
10000
20000
...
to import the data I have used so far

Code: Select all

wfopen GDP.xlsx range=Table1!A2 colhead=3 namepos=first
which gives me perfectly the short name of my series.
Unfortunately, it is not distiguished between the 2nd and 3rd row, all the information is writen in the description line,
which is then: GDP GDP, chain-linked, 2000, Eurostat.

If I use the name option then the short-name is overwriten.

Is there a way to import the "individual elements", which you can change manually in the Series-->Label View.

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

Re: name, label and description of series

Postby EViews Gareth » Mon Jun 06, 2011 9:44 am

Unfortunately not - it is currently somewhat limited, as you have noticed.

Katjes
Posts: 58
Joined: Thu Oct 02, 2008 5:46 am

Re: name, label and description of series

Postby Katjes » Tue Oct 11, 2011 2:32 am

Hi, taking up this issue again,
I have noticed that your Add-inn getmacrodata.prg gets all the detailed information (description, units, source,...) from the FRED database and all information is perfectly assigned to the corresponing fields in the Eviews series object.
I was wondering whether there is a code, where you can define each series, instead of defining about 500 series manually.
In the program there is only a database request, but the series have to be set up in the database first. Maybe you can provide this code too.
Many thanks in advance,
Katjes

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

Re: name, label and description of series

Postby EViews Gareth » Tue Oct 11, 2011 7:53 am

EViews can read that sort of information from a database, as long as the database has that information in it before hand. There is no other code to provide :(

Katjes
Posts: 58
Joined: Thu Oct 02, 2008 5:46 am

Re: name, label and description of series

Postby Katjes » Fri Nov 04, 2011 3:23 am

Hi, finally I find a way that works.
I import the information in alpha series (name_c, name_l, ...), where the n series are given from position 1 to n.

Code: Select all

for !ser=1 to n %code=name_c(!ser) 'includes the data abreviation %short=name_k(!ser) %long=name_l(!ser) %unit=name_u(!ser) %source=name_s(!ser) {%code}.displayname {%short} {%code}.label(u) {%unit} 'Sets the units field to text. {%code}.label(d) {%long} 'Sets the description field to text. {%code}.label(s) {%source} 'Sets the source field to text. next

jfgeli
Posts: 72
Joined: Fri Jan 30, 2009 6:29 pm

Re: name, label and description of series

Postby jfgeli » Mon Oct 13, 2014 2:27 am

Hi there,
I think this is a nice solution. However, I was wondering if there is a more robust solution on the side of IHS. Do we have already in Eviews 8.1 something like series_name.descritpion "US GDP" or series_name.unit "US dollars".
Cheers,
Fede

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

Re: name, label and description of series

Postby EViews Gareth » Mon Oct 13, 2014 6:59 am

I'm not sure what you're asking.

jfgeli
Posts: 72
Joined: Fri Jan 30, 2009 6:29 pm

Re: name, label and description of series

Postby jfgeli » Tue Oct 14, 2014 9:39 am

Hi there,
Sorry if I was not clear.
I have a similar need as the user in the original post. For example, a have an excel file with 3000 series displayed by columns. On the top of each column these series have, besides the name, a description, unit, remark, etc. I wonder if there is a command in which I could specify, when I read from the xlsx file, all these extra attributes which then are stored in an Eviews db. For example, in row 1 we have the name, in row 2 we have the description, in row 3 we have the units and the values start in row 4.
In addition, I wonder if there is a way to (programatically) add more attributes than those already specified by default. I know how to do it via the interface but I have many series to do that and the database is supposed to be updated regularly...

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

Re: name, label and description of series

Postby EViews Gareth » Tue Oct 14, 2014 9:55 am

Things have improved dramatically since 2011 (when the original question was asked), but are still not perfect. There isn't, currently, a way to bring those attributes in in one step. What you have to do is create an "attributes" page in your workfile that just contains the series names and attributes, and then use that page to bring in the attributes to your actual data page.

Look up the command importattr in the Command Reference for more details.

Also, look up setattr in the Object Reference.

jfgeli
Posts: 72
Joined: Fri Jan 30, 2009 6:29 pm

Re: name, label and description of series

Postby jfgeli » Wed Oct 15, 2014 12:22 am

Thanks :)


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests