The SASEBEA Interface Engine

Example 19.2 Retrieving Table IDs 6 and 25 for the Housing Industry

In this example, the BEA data set name is GDPbyIndustry as specified in the SETNAME= option. The TABLEID='6,25' specifies that the statistics for table ID 6 (Components of Value Added by Industry) and table ID 25 (Composition of Gross Output by Industry) are requested for the housing industry (INDUSTRY='HS'). The YEARS=ALL option specifies the range of data is for all available years. The output is shown in Output 19.2.1, which contains fourteen variables whose names are prefixed with the industry code (HS) followed by '_'. With the exception of the DATE variable, the variable names also have a suffix of '_' followed by the table ID. Between the prefix and suffix is the main part of the name, which is the truncated description of the time series. Together, the three parts, prefix, description and suffix, name each of the time series variables in the SAS output data set. The FREQ= option selects annual data and the OUTJSON= option specifies the name of the SAS output data set (which is also the name of the JSON data file that is retrieved from the BEA website and read into SAS. Output 19.2.1 shows the output for all available years.

options validvarname=any;

title 'Request Housing Statistics from Gross Domestic Product by Industry';
LIBNAME beagi sasebea "physical path to your folder for storing the BEA data"
   setname=GDPbyIndustry
   TableID='6,25'
   user='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'                                                                              
   freq=A
   industry='HS'
   outjson=gdp2i
   year=ALL
   format=json;

data myGDP2I;
   set beagi.gdp2i;
run;
proc print data=myGDP2I; run;

Output 19.2.1: Housing: Components of Value Added and Composition of Gross Output

Request Housing Statistics from Gross Domestic Product by Industry

ObsDate_HS_Compensation_of_empl_25_HS_Energy_inputs_25_HS_Gross_operating_surp_25_HS_Housing_25_HS_Intermediate_inputs_25_HS_Materials_inputs_25_HS_Purchased-services_i_25_HS_Taxes_on_production__25_HS_Value_added_25_HS_Compensation_of_empl_6_HS_Gross_operating_surp_6_HS_Housing_6_HS_Taxes_on_production__6
119978.80.0660.3857.988.00.587.5100.7769.88.8660.3769.8100.7
219989.40.0700.0911.499.10.498.7102.9812.39.4700.0812.3102.9
319999.90.0748.1968.0102.50.3102.1107.5865.59.9748.1865.5107.5
4200010.80.0797.61028.5107.90.4107.5112.3920.610.8797.6920.6112.3
5200111.10.0860.31103.7113.60.2113.4118.6990.111.1860.3990.1118.6
6200211.90.0890.91148.9118.50.5117.9127.51030.411.9890.91030.4127.5
7200311.90.0918.51193.8128.70.8127.9134.81065.211.9918.51065.2134.8
8200412.40.0976.81264.8132.82.8130.0142.71132.012.4976.81132.0142.7
9200512.80.01045.91355.0144.23.3140.9152.01210.712.81045.91210.7152.0
10200613.20.01099.51429.1151.63.8147.8164.81277.513.21099.51277.5164.8
11200714.00.01160.61505.9159.09.7149.3172.31346.914.01160.61346.9172.3
12200814.30.01255.01593.9143.36.5136.9181.31450.514.31255.01450.5181.3
13200914.20.01263.21616.8148.14.3143.8191.41468.714.21263.21468.7191.4
14201014.10.01289.81650.9155.03.8151.3192.01495.914.11289.81495.9192.0
15201114.80.01315.41686.0162.26.9155.3193.71523.914.81315.41523.9193.7
16201215.50.01335.51726.7180.57.4173.0195.21546.215.51335.51546.2195.2
17201315.60.01373.81781.3191.29.5181.6200.61590.115.61373.81590.1200.6
18201416.50.01410.51834.7198.17.9190.2209.61636.616.51410.51636.6209.6
19201517.50.01452.81895.7209.08.8200.2216.41686.717.51452.81686.7216.4
20201618.00.11503.41970.6224.710.4214.2224.51745.918.01503.41745.9224.5
21201718.90.11560.92048.5233.511.2222.2235.21815.118.91560.91815.1235.2
22201819.90.11631.62132.3236.212.0224.1244.61896.119.91631.61896.1244.6
23201921.20.11693.92229.7249.611.8237.6265.01980.121.21693.91980.1265.0
24202022.1-0.11757.82324.2273.514.1259.5270.82050.722.11757.82050.7270.8


Last updated: September 15, 2022