Export to text, specific format for PX-Job

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

linkan
Posts: 14
Joined: Mon Aug 24, 2015 7:23 am

Export to text, specific format for PX-Job

Postby linkan » Fri Jan 27, 2017 7:40 am

I need to be able to export my data to a text file with a specific format to use with PX-Job (a tool for creating PX-files for the PX-Web time series publishing tool made by statistics Sweden).

In this short examples I have the following series:
btvi101s
btvi101t
btvi102s
btvi102t
binv101s
binv101t
binv102s
binv102t

the names of the series is constructed of the industry the series pertains to, what question and what series (eg seasonally adjusted, trended etc). As PX-Webb is constructed, on the web you choose which of these combinations you want to get, and for what time and then download in your favorite format. To be able to create the PX-files we need to export the data in the following format:

Code: Select all

title
variable1;variable2;variable3;data
value1-1;value2-1;value3-1;cell-1
value1-1;value2-1;value3-2;cell-2

value1-n;value2-m;value3-l;cell-nml

Where variable in the PX-Web sense is for example industry and question, and the values are the different industries and questions in the system. For the series in the top, the file would look like this. Information about periods are stored elsewhere and not needed in this file.

Code: Select all

Manufacturing
Industry;question;series;data
btvi;101;s;47;34;23
btvi;101;t;44;32;35
btvi;102;s;21;29;45
btvi;102;t;22;27;39
binv;101;s;47;34;23
binv;101;t;44;32;35
binv;102;s;21;29;45
binv;102;t;22;27;39


Link to manufacturing monthly at our PX-Web database.

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

Re: Export to text, specific format for PX-Job

Postby EViews Gareth » Fri Jan 27, 2017 9:00 am

You'd be better off saving it as a simple text file in the EViews standard format and then using some other tool to reshape that text into the format you need.
Follow us on Twitter @IHSEViews


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 11 guests