/* ******************************************************************* LAST UPDATE: Oct 2018 THIS FILE DOES THE FOLLOWING 1) emissions and energy data: 1.1) compiled by Kaboo Leung using WIOD May 2012 version 1.2) corrected for LUX and IRL by Baran Doda using WIOD May 2012 version 1.3) import from excel (WIOD_CC_May2012_v1) and convert to stata => cc_may2012.dta 2) socio-economic data: 2.1) downloaded from WIOD July 2014 version 2.2) import from excel (WIOD_SEA_July2014.xlsx) and convert to stata => sea_jul2014.dta 3) exchange rate data: 2.1) downloaded from WIOD Septemrber 2012 version 2.2) import from (WIOD_EXR_Sep2012.xlsx) and convert to stata => exr_sep2012.dta 4) Uses information from the "NOTES" work sheet to label variables ******************************************************************* */ clear import excel "WIOD_CC_May2012_v1.xlsx", sheet("DATA") firstrow case(lower) save cc_may2012.dta, replace clear import excel "WIOD_SEA_July2014.xlsx", sheet("DATA") firstrow case(lower) save sea_jul2014.dta, replace clear import excel "WIOD_EXR_Sep2012.xlsx", sheet("EXR") firstrow case(lower) drop coun rename acr country reshape long _, i(country) j(year) rename _ exr save exr_sep2012.dta, replace clear use sea_jul2014.dta append using cc_may2012.dta drop desc * reshape the data to make it panel reshape long _, i(coun vari code) j(year) reshape wide _, i(coun year code) j(variable) s * rename and label vars rename _CAP cap rename _CO2 co2 rename _COMP comp rename _EMP emp rename _EMPE empe rename _EM em rename _GFCF gfcf rename _GFCF_P gfcf_p rename _GO go rename _GO_P go_p rename _GO_QI go_qi rename _H_EMP h_emp rename _H_EMPE h_empe rename _H_HS h_hs rename _H_LS h_ls rename _H_MS h_ms rename _II ii rename _II_P ii_p rename _II_QI ii_qi rename _K_GFCF k_gfcf rename _LAB lab rename _LABHS labhs rename _LABLS labls rename _LABMS labms rename _VA va rename _VA_P va_p rename _VA_QI va_qi label var cap "Capital compensation (in millions of national currency)" label var co2 "CO2 emissions in Gg (kt) (all fuels)" label var comp "Compensation of employees (in millions of national currency)" label var emp "Number of persons engaged (thousands)" label var empe "Number of employees (thousands)" label var em "Emission relevant energy use in TJ (all fuels)" label var gfcf "Nominal gross fixed capital formation (in millions of national currency)" label var gfcf_p "Price levels of gross fixed capital formation, 1995=100" label var go "Gross output by industry at current basic prices (in millions of national currency)" label var go_p "Price levels gross output, 1995=100" label var go_qi "Gross output, volume indices, 1995 = 100" label var h_emp "Total hours worked by persons engaged (millions)" label var h_empe "Total hours worked by employees (millions)" label var h_hs "Hours worked by high-skilled persons engaged (share in total hours)" label var h_ls "Hours worked by low-skilled persons engaged (share in total hours)" label var h_ms "Hours worked by medium-skilled persons engaged (share in total hours)" label var ii "Intermediate inputs at current purchasers' prices (in millions of national currency)" label var ii_p "Price levels of intermediate inputs, 1995=100" label var ii_qi "Intermediate inputs, volume indices, 1995 = 100" label var k_gfcf "Real fixed capital stock, 1995 prices" label var lab "Labour compensation (in millions of national currency)" label var labhs "High-skilled labour compensation (share in total labour compensation)" label var labls "Low-skilled labour compensation (share in total labour compensation)" label var labms "Medium-skilled labour compensation (share in total labour compensation)" label var va "Gross value added at current basic prices (in millions of national currency)" label var va_p "Price levels of gross value added, 1995=100" label var va_qi "Gross value added, volume indices, 1995 = 100" encode code, gene(sector) egen panelid = group(country sector), label sort country code year merge m:1 country year using exr_sep2012.dta drop _merge label var exr "Exchange rate in US$ per Unit of Local currency" xtset panelid year sort country code year merge m:1 code using sec_names.dta drop _merge sort country code year save WIOD_data_oct2017.dta, replace rm cc_may2012.dta rm sea_jul2014.dta rm exr_sep2012.dta