diff --git a/analysis/paper/si.Rmd b/analysis/paper/si.Rmd index 8a496b256893797a32ac63fe171b3f572c6c8372..6e640766fa42996f3aa5875c9fa93411ba36e234 100644 --- a/analysis/paper/si.Rmd +++ b/analysis/paper/si.Rmd @@ -17,7 +17,6 @@ output: - make sure final results are based off the most recent cluster run - clean code (& explanations) -- change all code to include 'combustion' label & remove materials and land-use from final code (save the whole script somewhere) ```{r, echo = FALSE, warning = FALSE, message = FALSE} diff --git a/analysis/preprocessing/full_code_europe.inequality.Rmd b/analysis/preprocessing/full_code_europe.inequality.Rmd index 69d4610a0ea99ddb59c0fe6ed8cd0804896df892..f427a5fbabb233926db36165195f0f281b529207 100644 --- a/analysis/preprocessing/full_code_europe.inequality.Rmd +++ b/analysis/preprocessing/full_code_europe.inequality.Rmd @@ -1374,16 +1374,16 @@ for (i in years_exb_ixi){ # CO2 - combustion - air - Exiobase_TIV_co2_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_co2_combustion_air_",year_current,"_ixi.csv"))[,-1] + Exiobase_TIV_co2_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_co2_combustion_air_",year_current,"_ixi.csv"))[,-1] - Exiobase_TIV_country_breakdown_co2_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_co2_combustion_air_", year_current,"_ixi.csv"))[,-1] %>% + Exiobase_TIV_country_breakdown_co2_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_co2_combustion_air_", year_current,"_ixi.csv"))[,-1] %>% row_to_names(row_number = 1) %>% - gather(country, TIV_CO2_domestic) + gather(country, TIV_CO2_combustion_domestic) - Exiobase_TIV_europe_breakdown_co2_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_co2_combustion_air_", year_current,"_ixi.csv"))[,-1] %>% + Exiobase_TIV_europe_breakdown_co2_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_co2_combustion_air_", year_current,"_ixi.csv"))[,-1] %>% row_to_names(row_number = 1) %>% mutate_at(vars(AT:ZA), funs(as.numeric(as.character(.)))) %>% - mutate(TIV_CO2_europe = AT + + mutate(TIV_CO2_combustion_europe = AT + BE + BG + CY + CZ + DE + DK + EE + ES + FI + FR + @@ -1394,13 +1394,13 @@ for (i in years_exb_ixi){ PT + TR + SK + SI + SE + RO + NO, - TIV_CO2_not_europe = AU + + TIV_CO2_combustion_not_europe = AU + BR + CA + CH + CN + ID + IN + JP + KR + MX + RU + TW + US + WA + WE + WF + WL + WM + ZA) %>% - select(TIV_CO2_europe,TIV_CO2_not_europe) + select(TIV_CO2_combustion_europe,TIV_CO2_combustion_not_europe) # CO2 - noncombustion - cement - air @@ -1556,16 +1556,16 @@ for (i in years_exb_ixi){ # CH4 - combustion -air - Exiobase_TIV_ch4_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_ch4_CO2eq_combustion_air_",year_current,"_ixi.csv"))[,-1] + Exiobase_TIV_ch4_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_ch4_CO2eq_combustion_air_",year_current,"_ixi.csv"))[,-1] - Exiobase_TIV_country_breakdown_ch4_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_ch4_CO2eq_combustion_air_", year_current, "_ixi.csv"))[,-1] %>% + Exiobase_TIV_country_breakdown_ch4_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_ch4_CO2eq_combustion_air_", year_current, "_ixi.csv"))[,-1] %>% row_to_names(row_number = 1) %>% - gather(country, TIV_CH4_domestic) + gather(country, TIV_CH4_combustion_domestic) - Exiobase_TIV_europe_breakdown_ch4_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_ch4_CO2eq_combustion_air_", year_current, "_ixi.csv"))[,-1] %>% + Exiobase_TIV_europe_breakdown_ch4_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_ch4_CO2eq_combustion_air_", year_current, "_ixi.csv"))[,-1] %>% row_to_names(row_number = 1) %>% mutate_at(vars(AT:ZA), funs(as.numeric(as.character(.)))) %>% - mutate(TIV_CH4_europe = AT + + mutate(TIV_CH4_combustion_europe = AT + BE + BG + CY + CZ + DE + DK + EE + ES + FI + FR + @@ -1576,13 +1576,13 @@ for (i in years_exb_ixi){ PT + TR + SK + SI + SE + RO + NO, - TIV_CH4_not_europe = AU + + TIV_CH4_combustion_not_europe = AU + BR + CA + CH + CN + ID + IN + JP + KR + MX + RU + TW + US + WA + WE + WF + WL + WM + ZA) %>% - select(TIV_CH4_europe,TIV_CH4_not_europe) + select(TIV_CH4_combustion_europe,TIV_CH4_combustion_not_europe) # CH4 - noncombustion - gas - air @@ -1887,16 +1887,16 @@ for (i in years_exb_ixi){ # N2O - combustion - air - Exiobase_TIV_n2o_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_n2o_CO2eq_combustion_air_",year_current,"_ixi.csv"))[,-1] + Exiobase_TIV_n2o_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_n2o_CO2eq_combustion_air_",year_current,"_ixi.csv"))[,-1] - Exiobase_TIV_country_breakdown_n2o_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_n2o_CO2eq_combustion_air_",year_current,"_ixi.csv"))[,-1] %>% + Exiobase_TIV_country_breakdown_n2o_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_n2o_CO2eq_combustion_air_",year_current,"_ixi.csv"))[,-1] %>% row_to_names(row_number = 1) %>% - gather(country, TIV_N2O_domestic) + gather(country, TIV_N2O_combustion_domestic) - Exiobase_TIV_europe_breakdown_n2o_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_n2o_CO2eq_combustion_air_",year_current,"_ixi.csv"))[,-1] %>% + Exiobase_TIV_europe_breakdown_n2o_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_n2o_CO2eq_combustion_air_",year_current,"_ixi.csv"))[,-1] %>% row_to_names(row_number = 1) %>% mutate_at(vars(AT:ZA), funs(as.numeric(as.character(.)))) %>% - mutate(TIV_N2O_europe = AT + + mutate(TIV_N2O_combustion_europe = AT + BE + BG + CY + CZ + DE + DK + EE + ES + FI + FR + @@ -1907,13 +1907,13 @@ for (i in years_exb_ixi){ PT + TR + SK + SI + SE + RO + NO, - TIV_N2O_not_europe = AU + + TIV_N2O_combustion_not_europe = AU + BR + CA + CH + CN + ID + IN + JP + KR + MX + RU + TW + US + WA + WE + WF + WL + WM + ZA) %>% - select(TIV_N2O_europe,TIV_N2O_not_europe) + select(TIV_N2O_combustion_europe,TIV_N2O_combustion_not_europe) # N2O - agriculture - air @@ -2068,13 +2068,13 @@ for (i in years_exb_ixi){ # join with labels TIV_with_labels = cbind(Exiobase_T_labels, - t(Exiobase_TIV_co2_bp), + t(Exiobase_TIV_co2_combustion_bp), t(Exiobase_TIV_co2_noncombustion_cement_bp), t(Exiobase_TIV_co2_noncombustion_lime_bp), t(Exiobase_TIV_co2_agriculture_peatdecay_bp), t(Exiobase_TIV_co2_waste_biogenic_bp), t(Exiobase_TIV_co2_waste_fossil_bp), - t(Exiobase_TIV_ch4_bp), + t(Exiobase_TIV_ch4_combustion_bp), t(Exiobase_TIV_ch4_noncombustion_gas_bp), t(Exiobase_TIV_ch4_noncombustion_oil_bp), t(Exiobase_TIV_ch4_noncombustion_anthracite_bp), @@ -2085,19 +2085,19 @@ for (i in years_exb_ixi){ t(Exiobase_TIV_ch4_noncombustion_oilrefinery_bp), t(Exiobase_TIV_ch4_agriculture_bp), t(Exiobase_TIV_ch4_waste_bp), - t(Exiobase_TIV_n2o_bp), + t(Exiobase_TIV_n2o_combustion_bp), t(Exiobase_TIV_n2o_agriculture_bp), t(Exiobase_TIV_sf6_bp), t(Exiobase_TIV_hfc_bp), t(Exiobase_TIV_pfc_bp), t(Exiobase_TIV_energy_use_bp)) %>% - rename(TIV_CO2 = "t(Exiobase_TIV_co2_bp)", + rename(TIV_CO2_combustion = "t(Exiobase_TIV_co2_combustion_bp)", TIV_CO2_noncombustion_cement = "t(Exiobase_TIV_co2_noncombustion_cement_bp)", TIV_CO2_noncombustion_lime = "t(Exiobase_TIV_co2_noncombustion_lime_bp)", TIV_CO2_agriculture_peatdecay = "t(Exiobase_TIV_co2_agriculture_peatdecay_bp)", TIV_CO2_waste_biogenic = "t(Exiobase_TIV_co2_waste_biogenic_bp)", TIV_CO2_waste_fossil = "t(Exiobase_TIV_co2_waste_fossil_bp)", - TIV_CH4 = "t(Exiobase_TIV_ch4_bp)", + TIV_CH4_combustion = "t(Exiobase_TIV_ch4_combustion_bp)", TIV_CH4_noncombustion_gas = "t(Exiobase_TIV_ch4_noncombustion_gas_bp)", TIV_CH4_noncombustion_oil = "t(Exiobase_TIV_ch4_noncombustion_oil_bp)", TIV_CH4_noncombustion_anthracite = "t(Exiobase_TIV_ch4_noncombustion_anthracite_bp)", @@ -2108,7 +2108,7 @@ for (i in years_exb_ixi){ TIV_CH4_noncombustion_oilrefinery = "t(Exiobase_TIV_ch4_noncombustion_oilrefinery_bp)", TIV_CH4_agriculture = "t(Exiobase_TIV_ch4_agriculture_bp)", TIV_CH4_waste = "t(Exiobase_TIV_ch4_waste_bp)", - TIV_N2O = "t(Exiobase_TIV_n2o_bp)", + TIV_N2O_combustion = "t(Exiobase_TIV_n2o_combustion_bp)", TIV_N2O_agriculture = "t(Exiobase_TIV_n2o_agriculture_bp)", TIV_SF6 = "t(Exiobase_TIV_sf6_bp)", TIV_HFC = "t(Exiobase_TIV_hfc_bp)", @@ -2129,13 +2129,13 @@ for (i in years_exb_ixi){ # join domestic_TIVs with labels domestic_TIV_with_labels = cbind(Exiobase_T_labels, - Exiobase_TIV_country_breakdown_co2_bp, + Exiobase_TIV_country_breakdown_co2_combustion_bp, Exiobase_TIV_country_breakdown_co2_noncombustion_cement_bp %>% select(-country), Exiobase_TIV_country_breakdown_co2_noncombustion_lime_bp %>% select(-country), Exiobase_TIV_country_breakdown_co2_agriculture_peatdecay_bp %>% select(-country), Exiobase_TIV_country_breakdown_co2_waste_biogenic_bp %>% select(-country), Exiobase_TIV_country_breakdown_co2_waste_fossil_bp %>% select(-country), - Exiobase_TIV_country_breakdown_ch4_bp %>% select(-country), + Exiobase_TIV_country_breakdown_ch4_combustion_bp %>% select(-country), Exiobase_TIV_country_breakdown_ch4_noncombustion_gas_bp %>% select(-country), Exiobase_TIV_country_breakdown_ch4_noncombustion_oil_bp %>% select(-country), Exiobase_TIV_country_breakdown_ch4_noncombustion_anthracite_bp %>% select(-country), @@ -2146,7 +2146,7 @@ for (i in years_exb_ixi){ Exiobase_TIV_country_breakdown_ch4_noncombustion_oilrefinery_bp %>% select(-country), Exiobase_TIV_country_breakdown_ch4_agriculture_bp %>% select(-country), Exiobase_TIV_country_breakdown_ch4_waste_bp %>% select(-country), - Exiobase_TIV_country_breakdown_n2o_bp %>% select(-country), + Exiobase_TIV_country_breakdown_n2o_combustion_bp %>% select(-country), Exiobase_TIV_country_breakdown_n2o_agriculture_bp %>% select(-country), Exiobase_TIV_country_breakdown_sf6_bp %>% select(-country), Exiobase_TIV_country_breakdown_hfc_bp %>% select(-country), @@ -2159,13 +2159,13 @@ for (i in years_exb_ixi){ look_domestic = cbind(year_domestic,domestic_TIV_with_labels) %>% rename(country_of_production = V1, sector = V2, geo = country, year = year_domestic) %>% - mutate(TIV_CO2_domestic = as.numeric(TIV_CO2_domestic), + mutate(TIV_CO2_combustion_domestic = as.numeric(TIV_CO2_combustion_domestic), TIV_CO2_noncombustion_cement_domestic = as.numeric(TIV_CO2_noncombustion_cement_domestic), TIV_CO2_noncombustion_lime_domestic = as.numeric(TIV_CO2_noncombustion_lime_domestic), TIV_CO2_agriculture_peatdecay_domestic = as.numeric(TIV_CO2_agriculture_peatdecay_domestic), TIV_CO2_waste_biogenic_domestic = as.numeric(TIV_CO2_waste_biogenic_domestic), TIV_CO2_waste_fossil_domestic = as.numeric(TIV_CO2_waste_fossil_domestic), - TIV_CH4_domestic = as.numeric(TIV_CH4_domestic), + TIV_CH4_combustion_domestic = as.numeric(TIV_CH4_combustion_domestic), TIV_CH4_noncombustion_gas_domestic = as.numeric(TIV_CH4_noncombustion_gas_domestic), TIV_CH4_noncombustion_oil_domestic = as.numeric(TIV_CH4_noncombustion_oil_domestic), TIV_CH4_noncombustion_anthracite_domestic = as.numeric(TIV_CH4_noncombustion_anthracite_domestic), @@ -2176,7 +2176,7 @@ for (i in years_exb_ixi){ TIV_CH4_noncombustion_oilrefinery_domestic = as.numeric(TIV_CH4_noncombustion_oilrefinery_domestic), TIV_CH4_agriculture_domestic = as.numeric(TIV_CH4_agriculture_domestic), TIV_CH4_waste_domestic = as.numeric(TIV_CH4_waste_domestic), - TIV_N2O_domestic = as.numeric(TIV_N2O_domestic), + TIV_N2O_combustion_domestic = as.numeric(TIV_N2O_combustion_domestic), TIV_N2O_agriculture_domestic = as.numeric(TIV_N2O_agriculture_domestic), TIV_SF6_domestic = as.numeric(TIV_SF6_domestic), TIV_HFC_domestic = as.numeric(TIV_HFC_domestic), @@ -2188,13 +2188,13 @@ for (i in years_exb_ixi){ # european TIVs with labels europe_TIV_with_labels = cbind(Exiobase_T_labels, - Exiobase_TIV_europe_breakdown_co2_bp, + Exiobase_TIV_europe_breakdown_co2_combustion_bp, Exiobase_TIV_europe_breakdown_co2_noncombustion_cement_bp, Exiobase_TIV_europe_breakdown_co2_noncombustion_lime_bp, Exiobase_TIV_europe_breakdown_co2_agriculture_peatdecay_bp, Exiobase_TIV_europe_breakdown_co2_waste_biogenic_bp, Exiobase_TIV_europe_breakdown_co2_waste_fossil_bp, - Exiobase_TIV_europe_breakdown_ch4_bp, + Exiobase_TIV_europe_breakdown_ch4_combustion_bp, Exiobase_TIV_europe_breakdown_ch4_noncombustion_gas_bp, Exiobase_TIV_europe_breakdown_ch4_noncombustion_oil_bp, Exiobase_TIV_europe_breakdown_ch4_noncombustion_anthracite_bp, @@ -2205,7 +2205,7 @@ for (i in years_exb_ixi){ Exiobase_TIV_europe_breakdown_ch4_noncombustion_oilrefinery_bp, Exiobase_TIV_europe_breakdown_ch4_agriculture_bp, Exiobase_TIV_europe_breakdown_ch4_waste_bp, - Exiobase_TIV_europe_breakdown_n2o_bp, + Exiobase_TIV_europe_breakdown_n2o_combustion_bp, Exiobase_TIV_europe_breakdown_n2o_agriculture_bp, Exiobase_TIV_europe_breakdown_sf6_bp, Exiobase_TIV_europe_breakdown_hfc_bp, @@ -2217,13 +2217,13 @@ for (i in years_exb_ixi){ look_europe = cbind(year_europe,europe_TIV_with_labels) %>% rename(country_of_production = V1, sector = V2, year = year_europe) %>% - mutate(TIV_CO2_europe = as.numeric(TIV_CO2_europe), + mutate(TIV_CO2_combustion_europe = as.numeric(TIV_CO2_combustion_europe), TIV_CO2_noncombustion_cement_europe = as.numeric(TIV_CO2_noncombustion_cement_europe), TIV_CO2_noncombustion_lime_europe = as.numeric(TIV_CO2_noncombustion_lime_europe), TIV_CO2_agriculture_peatdecay_europe = as.numeric(TIV_CO2_agriculture_peatdecay_europe), TIV_CO2_waste_biogenic_europe = as.numeric(TIV_CO2_waste_biogenic_europe), TIV_CO2_waste_fossil_europe = as.numeric(TIV_CO2_waste_fossil_europe), - TIV_CH4_europe = as.numeric(TIV_CH4_europe), + TIV_CH4_combustion_europe = as.numeric(TIV_CH4_combustion_europe), TIV_CH4_noncombustion_gas_europe = as.numeric(TIV_CH4_noncombustion_gas_europe), TIV_CH4_noncombustion_oil_europe = as.numeric(TIV_CH4_noncombustion_oil_europe), TIV_CH4_noncombustion_anthracite_europe = as.numeric(TIV_CH4_noncombustion_anthracite_europe), @@ -2234,7 +2234,7 @@ for (i in years_exb_ixi){ TIV_CH4_noncombustion_oilrefinery_europe = as.numeric(TIV_CH4_noncombustion_oilrefinery_europe), TIV_CH4_agriculture_europe = as.numeric(TIV_CH4_agriculture_europe), TIV_CH4_waste_europe = as.numeric(TIV_CH4_waste_europe), - TIV_N2O_europe = as.numeric(TIV_N2O_europe), + TIV_N2O_combustion_europe = as.numeric(TIV_N2O_combustion_europe), TIV_N2O_agriculture_europe = as.numeric(TIV_N2O_agriculture_europe), TIV_SF6_europe = as.numeric(TIV_SF6_europe), TIV_HFC_europe = as.numeric(TIV_HFC_europe), @@ -2252,7 +2252,7 @@ for (i in years_exb_ixi){ Exiobase_FD_labels = as.data.frame(t(read.csv(paste0(data_dir_exiobase, "/Exiobase_FD_labels_ixi.csv")))[-1,-3]) %>% mutate(V1 = dplyr::recode(V1,"GR" = "EL","GB" = "UK")) - national_CO2_footprints = Exiobase_FD * t(Exiobase_TIV_co2_bp) + national_CO2_combustion_footprints = Exiobase_FD * t(Exiobase_TIV_co2_combustion_bp) national_CO2_noncombustion_cement_footprints = Exiobase_FD * t(Exiobase_TIV_co2_noncombustion_cement_bp) @@ -2264,7 +2264,7 @@ for (i in years_exb_ixi){ national_CO2_waste_fossil_footprints = Exiobase_FD * t(Exiobase_TIV_co2_waste_fossil_bp) - national_CH4_footprints = Exiobase_FD * t(Exiobase_TIV_ch4_bp) + national_CH4_combustion_footprints = Exiobase_FD * t(Exiobase_TIV_ch4_combustion_bp) national_CH4_noncombustion_gas_footprints = Exiobase_FD * t(Exiobase_TIV_ch4_noncombustion_gas_bp) @@ -2286,7 +2286,7 @@ for (i in years_exb_ixi){ national_CH4_waste_footprints = Exiobase_FD * t(Exiobase_TIV_ch4_waste_bp) - national_N2O_footprints = Exiobase_FD * t(Exiobase_TIV_n2o_bp) + national_N2O_combustion_footprints = Exiobase_FD * t(Exiobase_TIV_n2o_combustion_bp) national_N2O_agriculture_footprints = Exiobase_FD * t(Exiobase_TIV_n2o_agriculture_bp) @@ -2302,13 +2302,13 @@ for (i in years_exb_ixi){ # together national_footprints_w_labels = cbind(Exiobase_FD_labels, - rowSums(t(national_CO2_footprints)), + rowSums(t(national_CO2_combustion_footprints)), rowSums(t(national_CO2_noncombustion_cement_footprints)), rowSums(t(national_CO2_noncombustion_lime_footprints)), rowSums(t(national_CO2_agriculture_peatdecay_footprints)), rowSums(t(national_CO2_waste_biogenic_footprints)), rowSums(t(national_CO2_waste_fossil_footprints)), - rowSums(t(national_CH4_footprints)), + rowSums(t(national_CH4_combustion_footprints)), rowSums(t(national_CH4_noncombustion_gas_footprints)), rowSums(t(national_CH4_noncombustion_oil_footprints)), rowSums(t(national_CH4_noncombustion_anthracite_footprints)), @@ -2319,7 +2319,7 @@ for (i in years_exb_ixi){ rowSums(t(national_CH4_noncombustion_oilrefinery_footprints)), rowSums(t(national_CH4_agriculture_footprints)), rowSums(t(national_CH4_waste_footprints)), - rowSums(t(national_N2O_footprints)), + rowSums(t(national_N2O_combustion_footprints)), rowSums(t(national_N2O_agriculture_footprints)), rowSums(t(national_SF6_footprints)), rowSums(t(national_HFC_footprints)), @@ -2336,13 +2336,13 @@ for (i in years_exb_ixi){ direct_FD_extensions = mapply(direct_FD_extensions, FUN = as.numeric) direct_FD_extensions = matrix(data=direct_FD_extensions,ncol=343,nrow=1113) - direct_FD_co2 = direct_FD_extensions[24,] + direct_FD_co2_combustion = direct_FD_extensions[24,] direct_FD_co2_noncombustion_cement = direct_FD_extensions[93,] direct_FD_co2_noncombustion_lime = direct_FD_extensions[94,] direct_FD_co2_agriculture_peatdecay = direct_FD_extensions[428,] direct_FD_co2_waste_biogenic = direct_FD_extensions[438,] direct_FD_co2_waste_fossil = direct_FD_extensions[439,] - direct_FD_ch4 = direct_FD_extensions[25,]*28 + direct_FD_ch4_combustion = direct_FD_extensions[25,]*28 direct_FD_ch4_noncombustion_gas = direct_FD_extensions[68,]*28 direct_FD_ch4_noncombustion_oil = direct_FD_extensions[69,]*28 direct_FD_ch4_noncombustion_anthracite = direct_FD_extensions[70,]*28 @@ -2353,7 +2353,7 @@ for (i in years_exb_ixi){ direct_FD_ch4_noncombustion_oilrefinery = direct_FD_extensions[75,]*28 direct_FD_ch4_agriculture = direct_FD_extensions[427,]*28 direct_FD_ch4_waste = direct_FD_extensions[436,]*28 - direct_FD_n2o = direct_FD_extensions[26,]*265 + direct_FD_n2o_combustion = direct_FD_extensions[26,]*265 direct_FD_n2o_agriculture = direct_FD_extensions[430,]*265 direct_FD_sf6 = direct_FD_extensions[424,]*23500 direct_FD_hfc = direct_FD_extensions[425,] @@ -2361,13 +2361,13 @@ for (i in years_exb_ixi){ direct_FD_energy = direct_FD_extensions[470,] - direct_FD_fp = data.frame(direct_FD_co2, + direct_FD_fp = data.frame(direct_FD_co2_combustion, direct_FD_co2_noncombustion_cement, direct_FD_co2_noncombustion_lime, direct_FD_co2_agriculture_peatdecay, direct_FD_co2_waste_biogenic, direct_FD_co2_waste_fossil, - direct_FD_ch4, + direct_FD_ch4_combustion, direct_FD_ch4_noncombustion_gas, direct_FD_ch4_noncombustion_oil, direct_FD_ch4_noncombustion_anthracite, @@ -2378,7 +2378,7 @@ for (i in years_exb_ixi){ direct_FD_ch4_noncombustion_oilrefinery, direct_FD_ch4_agriculture, direct_FD_ch4_waste, - direct_FD_n2o, + direct_FD_n2o_combustion, direct_FD_n2o_agriculture, direct_FD_sf6, direct_FD_hfc, @@ -2391,13 +2391,13 @@ for (i in years_exb_ixi){ rename(year = year_national_fp, geo = V1, fd_category = V2, - co2 = "rowSums(t(national_CO2_footprints))", + co2_combustion = "rowSums(t(national_CO2_combustion_footprints))", co2_noncombustion_cement = "rowSums(t(national_CO2_noncombustion_cement_footprints))", co2_noncombustion_lime = "rowSums(t(national_CO2_noncombustion_lime_footprints))", co2_agriculture_peatdecay = "rowSums(t(national_CO2_agriculture_peatdecay_footprints))", co2_waste_biogenic = "rowSums(t(national_CO2_waste_biogenic_footprints))", co2_waste_fossil = "rowSums(t(national_CO2_waste_fossil_footprints))", - ch4 = "rowSums(t(national_CH4_footprints))", + ch4_combustion = "rowSums(t(national_CH4_combustion_footprints))", ch4_noncombustion_gas = "rowSums(t(national_CH4_noncombustion_gas_footprints))", ch4_noncombustion_oil = "rowSums(t(national_CH4_noncombustion_oil_footprints))", ch4_noncombustion_anthracite = "rowSums(t(national_CH4_noncombustion_anthracite_footprints))", @@ -2408,7 +2408,7 @@ for (i in years_exb_ixi){ ch4_noncombustion_oilrefinery = "rowSums(t(national_CH4_noncombustion_oilrefinery_footprints))", ch4_agriculture = "rowSums(t(national_CH4_agriculture_footprints))", ch4_waste = "rowSums(t(national_CH4_waste_footprints))", - n2o = "rowSums(t(national_N2O_footprints))", + n2o_combustion = "rowSums(t(national_N2O_combustion_footprints))", n2o_agriculture = "rowSums(t(national_N2O_agriculture_footprints))", sf6 = "rowSums(t(national_SF6_footprints))", hfc = "rowSums(t(national_HFC_footprints))", @@ -2417,8 +2417,8 @@ for (i in years_exb_ixi){ select(year, geo, fd_category, - co2, - direct_FD_co2, + co2_combustion, + direct_FD_co2_combustion, co2_noncombustion_cement, direct_FD_co2_noncombustion_cement, co2_noncombustion_lime, @@ -2429,8 +2429,8 @@ for (i in years_exb_ixi){ direct_FD_co2_waste_biogenic, co2_waste_fossil, direct_FD_co2_waste_fossil, - ch4, - direct_FD_ch4, + ch4_combustion, + direct_FD_ch4_combustion, ch4_noncombustion_gas, direct_FD_ch4_noncombustion_gas, ch4_noncombustion_oil, @@ -2451,8 +2451,8 @@ for (i in years_exb_ixi){ direct_FD_ch4_agriculture, ch4_waste, direct_FD_ch4_waste, - n2o, - direct_FD_n2o, + n2o_combustion, + direct_FD_n2o_combustion, n2o_agriculture, direct_FD_n2o_agriculture, sf6, @@ -2558,13 +2558,13 @@ for (i in years_exb_ixi){ t(HFC_air), t(PFC_air), t(energy_carrier_use)) %>% - rename(CO2 = 1, + rename(CO2_combustion = 1, CO2_noncombustion_cement = 2, CO2_noncombustion_lime = 3, CO2_agriculture_peatdecay = 4, CO2_waste_biogenic = 5, CO2_waste_fossil = 6, - CH4 = 7, + CH4_combustion = 7, CH4_noncombustion_gas = 8, CH4_noncombustion_oil = 9, CH4_noncombustion_anthracite = 10, @@ -2575,7 +2575,7 @@ for (i in years_exb_ixi){ CH4_noncombustion_oilrefinery = 15, CH4_agriculture = 16, CH4_waste = 17, - N2O = 18, + N2O_combustion = 18, N2O_agriculture = 19, SF6 = 20, HFC = 21, PFC = 22, energy = 23) @@ -2737,13 +2737,13 @@ direct_FD_fp_long = national_fp %>% "PT" , "TR" , "SK" , "SI" , "SE" , "RO" , "NO")) %>% - select(year,geo,fd_category,direct_FD_co2, + select(year,geo,fd_category,direct_FD_co2_combustion, direct_FD_co2_noncombustion_cement, direct_FD_co2_noncombustion_lime, direct_FD_co2_agriculture_peatdecay, direct_FD_co2_waste_biogenic, direct_FD_co2_waste_fossil, - direct_FD_ch4, + direct_FD_ch4_combustion, direct_FD_ch4_noncombustion_gas, direct_FD_ch4_noncombustion_oil, direct_FD_ch4_noncombustion_anthracite, @@ -2754,7 +2754,7 @@ direct_FD_fp_long = national_fp %>% direct_FD_ch4_noncombustion_oilrefinery, direct_FD_ch4_agriculture, direct_FD_ch4_waste, - direct_FD_n2o, + direct_FD_n2o_combustion, direct_FD_n2o_agriculture, direct_FD_sf6, direct_FD_hfc, @@ -2773,13 +2773,13 @@ direct_FD_fp_long_disagg = cbind(sector,direct_FD_fp_long) %>% left_join(env_ac_ainah_r2_ch4, by = c("geo","sector")) %>% left_join(env_ac_ainah_r2_n2o, by = c("geo","sector")) %>% left_join(env_ac_pefasu, by = c("geo","sector")) %>% - mutate(direct_FD_co2 = (direct_FD_co2 + + mutate(direct_FD_co2 = (direct_FD_co2_combustion + direct_FD_co2_noncombustion_cement + direct_FD_co2_noncombustion_lime + direct_FD_co2_agriculture_peatdecay + direct_FD_co2_waste_biogenic + direct_FD_co2_waste_fossil)*share_of_total_co2, - direct_FD_ch4 = (direct_FD_ch4 + + direct_FD_ch4 = (direct_FD_ch4_combustion + direct_FD_ch4_noncombustion_gas + direct_FD_ch4_noncombustion_oil + direct_FD_ch4_noncombustion_anthracite + @@ -2790,7 +2790,7 @@ direct_FD_fp_long_disagg = cbind(sector,direct_FD_fp_long) %>% direct_FD_ch4_noncombustion_oilrefinery + direct_FD_ch4_agriculture + direct_FD_ch4_waste)*share_of_total_ch4, - direct_FD_n2o = (direct_FD_n2o + + direct_FD_n2o = (direct_FD_n2o_combustion + direct_FD_n2o_agriculture)*share_of_total_n2o, direct_FD_energy = direct_FD_energy*share_of_total_energy) %>% left_join(shares, by = c("year","geo","coicop")) %>% @@ -2944,7 +2944,7 @@ results = fd_exiobase %>% QUINTILE4, QUINTILE5, fd_total = QUINTILE1+QUINTILE2+QUINTILE3+QUINTILE4+QUINTILE5, - TIV_CO2 = TIV_CO2 + + TIV_CO2 = TIV_CO2_combustion + TIV_CO2_noncombustion_cement + TIV_CO2_noncombustion_lime + TIV_CO2_agriculture_peatdecay + @@ -2956,7 +2956,7 @@ results = fd_exiobase %>% q4_co2 = QUINTILE4*TIV_CO2, q5_co2 = QUINTILE5*TIV_CO2, co2_total = q1_co2+q2_co2+q3_co2+q4_co2+q5_co2, - TIV_CO2_domestic = TIV_CO2_domestic + + TIV_CO2_domestic = TIV_CO2_combustion_domestic + TIV_CO2_noncombustion_cement_domestic + TIV_CO2_noncombustion_lime_domestic + TIV_CO2_agriculture_peatdecay_domestic + @@ -2968,7 +2968,7 @@ results = fd_exiobase %>% q4_co2_domestic = QUINTILE4*TIV_CO2_domestic, q5_co2_domestic = QUINTILE5*TIV_CO2_domestic, co2_total_domestic = q1_co2_domestic+q2_co2_domestic+q3_co2_domestic+q4_co2_domestic+q5_co2_domestic, - TIV_CO2_europe = TIV_CO2_europe + + TIV_CO2_europe = TIV_CO2_combustion_europe + TIV_CO2_noncombustion_cement_europe + TIV_CO2_noncombustion_lime_europe + TIV_CO2_agriculture_peatdecay_europe + @@ -2981,7 +2981,7 @@ results = fd_exiobase %>% q5_co2_europe = QUINTILE5*(TIV_CO2_europe - TIV_CO2_domestic), co2_total_europe = q1_co2_europe+q2_co2_europe+q3_co2_europe+q4_co2_europe+q5_co2_europe, TIV_CO2eq = TIV_CO2 + - TIV_CH4 + + TIV_CH4_combustion + TIV_CH4_noncombustion_gas + TIV_CH4_noncombustion_oil + TIV_CH4_noncombustion_anthracite + @@ -2992,7 +2992,7 @@ results = fd_exiobase %>% TIV_CH4_noncombustion_oilrefinery + TIV_CH4_agriculture + TIV_CH4_waste + - TIV_N2O + + TIV_N2O_combustion + TIV_N2O_agriculture + TIV_SF6 + TIV_HFC + TIV_PFC, q1_co2eq = QUINTILE1*TIV_CO2eq, @@ -3002,7 +3002,7 @@ results = fd_exiobase %>% q5_co2eq = QUINTILE5*TIV_CO2eq, co2eq_total = q1_co2eq + q2_co2eq + q3_co2eq + q4_co2eq + q5_co2eq, TIV_CO2eq_domestic = TIV_CO2_domestic + - TIV_CH4_domestic + + TIV_CH4_combustion_domestic + TIV_CH4_noncombustion_gas_domestic + TIV_CH4_noncombustion_oil_domestic + TIV_CH4_noncombustion_anthracite_domestic + @@ -3013,7 +3013,7 @@ results = fd_exiobase %>% TIV_CH4_noncombustion_oilrefinery_domestic + TIV_CH4_agriculture_domestic + TIV_CH4_waste_domestic + - TIV_N2O_domestic + + TIV_N2O_combustion_domestic + TIV_N2O_agriculture_domestic + TIV_SF6_domestic + TIV_HFC_domestic + TIV_PFC_domestic, q1_co2eq_domestic = QUINTILE1*TIV_CO2eq_domestic, @@ -3023,7 +3023,7 @@ results = fd_exiobase %>% q5_co2eq_domestic = QUINTILE5*TIV_CO2eq_domestic, co2eq_total_domestic = q1_co2eq_domestic + q2_co2eq_domestic + q3_co2eq_domestic + q4_co2eq_domestic + q5_co2eq_domestic, TIV_CO2eq_europe = TIV_CO2_europe + - TIV_CH4_europe + + TIV_CH4_combustion_europe + TIV_CH4_noncombustion_gas_europe + TIV_CH4_noncombustion_oil_europe + TIV_CH4_noncombustion_anthracite_europe + @@ -3034,7 +3034,7 @@ results = fd_exiobase %>% TIV_CH4_noncombustion_oilrefinery_europe + TIV_CH4_agriculture_europe + TIV_CH4_waste_europe + - TIV_N2O_europe + + TIV_N2O_combustion_europe + TIV_N2O_agriculture_europe + TIV_SF6_europe + TIV_HFC_europe + TIV_PFC_europe, q1_co2eq_europe = QUINTILE1*(TIV_CO2eq_europe - TIV_CO2eq_domestic), @@ -3356,16 +3356,16 @@ for (i in years_exb_pxp){ # CO2 - combustion - air - Exiobase_TIV_co2_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_pxp/TIV_co2_combustion_air_",year_current,"_pxp.csv"))[,-1] + Exiobase_TIV_co2_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_pxp/TIV_co2_combustion_air_",year_current,"_pxp.csv"))[,-1] - Exiobase_TIV_country_breakdown_co2_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_pxp/TIV_country_breakdown_co2_combustion_air_", year_current,"_pxp.csv"))[,-1] %>% + Exiobase_TIV_country_breakdown_co2_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_pxp/TIV_country_breakdown_co2_combustion_air_", year_current,"_pxp.csv"))[,-1] %>% row_to_names(row_number = 1) %>% - gather(country, TIV_CO2_domestic) + gather(country, TIV_CO2_combustion_domestic) - Exiobase_TIV_europe_breakdown_co2_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_pxp/TIV_country_breakdown_co2_combustion_air_", year_current,"_pxp.csv"))[,-1] %>% + Exiobase_TIV_europe_breakdown_co2_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_pxp/TIV_country_breakdown_co2_combustion_air_", year_current,"_pxp.csv"))[,-1] %>% row_to_names(row_number = 1) %>% mutate_at(vars(AT:ZA), funs(as.numeric(as.character(.)))) %>% - mutate(TIV_CO2_europe = AT + + mutate(TIV_CO2_combustion_europe = AT + BE + BG + CY + CZ + DE + DK + EE + ES + FI + FR + @@ -3376,13 +3376,13 @@ for (i in years_exb_pxp){ PT + TR + SK + SI + SE + RO + NO, - TIV_CO2_not_europe = AU + + TIV_CO2_combustion_not_europe = AU + BR + CA + CH + CN + ID + IN + JP + KR + MX + RU + TW + US + WA + WE + WF + WL + WM + ZA) %>% - select(TIV_CO2_europe,TIV_CO2_not_europe) + select(TIV_CO2_combustion_europe,TIV_CO2_combustion_not_europe) # CO2 - noncombustion - cement - air @@ -3538,16 +3538,16 @@ for (i in years_exb_pxp){ # CH4 - combustion -air - Exiobase_TIV_ch4_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_pxp/TIV_ch4_CO2eq_combustion_air_",year_current,"_pxp.csv"))[,-1] + Exiobase_TIV_ch4_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_pxp/TIV_ch4_CO2eq_combustion_air_",year_current,"_pxp.csv"))[,-1] - Exiobase_TIV_country_breakdown_ch4_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_pxp/TIV_country_breakdown_ch4_CO2eq_combustion_air_", year_current, "_pxp.csv"))[,-1] %>% + Exiobase_TIV_country_breakdown_ch4_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_pxp/TIV_country_breakdown_ch4_CO2eq_combustion_air_", year_current, "_pxp.csv"))[,-1] %>% row_to_names(row_number = 1) %>% - gather(country, TIV_CH4_domestic) + gather(country, TIV_CH4_combustion_domestic) - Exiobase_TIV_europe_breakdown_ch4_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_pxp/TIV_country_breakdown_ch4_CO2eq_combustion_air_", year_current, "_pxp.csv"))[,-1] %>% + Exiobase_TIV_europe_breakdown_ch4_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_pxp/TIV_country_breakdown_ch4_CO2eq_combustion_air_", year_current, "_pxp.csv"))[,-1] %>% row_to_names(row_number = 1) %>% mutate_at(vars(AT:ZA), funs(as.numeric(as.character(.)))) %>% - mutate(TIV_CH4_europe = AT + + mutate(TIV_CH4_combustion_europe = AT + BE + BG + CY + CZ + DE + DK + EE + ES + FI + FR + @@ -3558,13 +3558,13 @@ for (i in years_exb_pxp){ PT + TR + SK + SI + SE + RO + NO, - TIV_CH4_not_europe = AU + + TIV_CH4_combustion_not_europe = AU + BR + CA + CH + CN + ID + IN + JP + KR + MX + RU + TW + US + WA + WE + WF + WL + WM + ZA) %>% - select(TIV_CH4_europe,TIV_CH4_not_europe) + select(TIV_CH4_combustion_europe,TIV_CH4_combustion_not_europe) # CH4 - noncombustion - gas - air @@ -3870,16 +3870,16 @@ for (i in years_exb_pxp){ # N2O - combustion - air - Exiobase_TIV_n2o_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_pxp/TIV_n2o_CO2eq_combustion_air_",year_current,"_pxp.csv"))[,-1] + Exiobase_TIV_n2o_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_pxp/TIV_n2o_CO2eq_combustion_air_",year_current,"_pxp.csv"))[,-1] - Exiobase_TIV_country_breakdown_n2o_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_pxp/TIV_country_breakdown_n2o_CO2eq_combustion_air_",year_current,"_pxp.csv"))[,-1] %>% + Exiobase_TIV_country_breakdown_n2o_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_pxp/TIV_country_breakdown_n2o_CO2eq_combustion_air_",year_current,"_pxp.csv"))[,-1] %>% row_to_names(row_number = 1) %>% - gather(country, TIV_N2O_domestic) + gather(country, TIV_N2O_combustion_domestic) - Exiobase_TIV_europe_breakdown_n2o_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_pxp/TIV_country_breakdown_n2o_CO2eq_combustion_air_",year_current,"_pxp.csv"))[,-1] %>% + Exiobase_TIV_europe_breakdown_n2o_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_pxp/TIV_country_breakdown_n2o_CO2eq_combustion_air_",year_current,"_pxp.csv"))[,-1] %>% row_to_names(row_number = 1) %>% mutate_at(vars(AT:ZA), funs(as.numeric(as.character(.)))) %>% - mutate(TIV_N2O_europe = AT + + mutate(TIV_N2O_combustion_europe = AT + BE + BG + CY + CZ + DE + DK + EE + ES + FI + FR + @@ -3890,13 +3890,13 @@ for (i in years_exb_pxp){ PT + TR + SK + SI + SE + RO + NO, - TIV_N2O_not_europe = AU + + TIV_N2O_combustion_not_europe = AU + BR + CA + CH + CN + ID + IN + JP + KR + MX + RU + TW + US + WA + WE + WF + WL + WM + ZA) %>% - select(TIV_N2O_europe,TIV_N2O_not_europe) + select(TIV_N2O_combustion_europe,TIV_N2O_combustion_not_europe) # N2O - agriculture - air @@ -4052,13 +4052,13 @@ for (i in years_exb_pxp){ # join with labels TIV_with_labels = cbind(Exiobase_T_labels, - t(Exiobase_TIV_co2_bp), + t(Exiobase_TIV_co2_combustion_bp), t(Exiobase_TIV_co2_noncombustion_cement_bp), t(Exiobase_TIV_co2_noncombustion_lime_bp), t(Exiobase_TIV_co2_agriculture_peatdecay_bp), t(Exiobase_TIV_co2_waste_biogenic_bp), t(Exiobase_TIV_co2_waste_fossil_bp), - t(Exiobase_TIV_ch4_bp), + t(Exiobase_TIV_ch4_combustion_bp), t(Exiobase_TIV_ch4_noncombustion_gas_bp), t(Exiobase_TIV_ch4_noncombustion_oil_bp), t(Exiobase_TIV_ch4_noncombustion_anthracite_bp), @@ -4069,19 +4069,19 @@ for (i in years_exb_pxp){ t(Exiobase_TIV_ch4_noncombustion_oilrefinery_bp), t(Exiobase_TIV_ch4_agriculture_bp), t(Exiobase_TIV_ch4_waste_bp), - t(Exiobase_TIV_n2o_bp), + t(Exiobase_TIV_n2o_combustion_bp), t(Exiobase_TIV_n2o_agriculture_bp), t(Exiobase_TIV_sf6_bp), t(Exiobase_TIV_hfc_bp), t(Exiobase_TIV_pfc_bp), t(Exiobase_TIV_energy_use_bp)) %>% - rename(TIV_CO2 = "t(Exiobase_TIV_co2_bp)", + rename(TIV_CO2_combustion = "t(Exiobase_TIV_co2_combustion_bp)", TIV_CO2_noncombustion_cement = "t(Exiobase_TIV_co2_noncombustion_cement_bp)", TIV_CO2_noncombustion_lime = "t(Exiobase_TIV_co2_noncombustion_lime_bp)", TIV_CO2_agriculture_peatdecay = "t(Exiobase_TIV_co2_agriculture_peatdecay_bp)", TIV_CO2_waste_biogenic = "t(Exiobase_TIV_co2_waste_biogenic_bp)", TIV_CO2_waste_fossil = "t(Exiobase_TIV_co2_waste_fossil_bp)", - TIV_CH4 = "t(Exiobase_TIV_ch4_bp)", + TIV_CH4_combustion = "t(Exiobase_TIV_ch4_combustion_bp)", TIV_CH4_noncombustion_gas = "t(Exiobase_TIV_ch4_noncombustion_gas_bp)", TIV_CH4_noncombustion_oil = "t(Exiobase_TIV_ch4_noncombustion_oil_bp)", TIV_CH4_noncombustion_anthracite = "t(Exiobase_TIV_ch4_noncombustion_anthracite_bp)", @@ -4092,7 +4092,7 @@ for (i in years_exb_pxp){ TIV_CH4_noncombustion_oilrefinery = "t(Exiobase_TIV_ch4_noncombustion_oilrefinery_bp)", TIV_CH4_agriculture = "t(Exiobase_TIV_ch4_agriculture_bp)", TIV_CH4_waste = "t(Exiobase_TIV_ch4_waste_bp)", - TIV_N2O = "t(Exiobase_TIV_n2o_bp)", + TIV_N2O_combustion = "t(Exiobase_TIV_n2o_combustion_bp)", TIV_N2O_agriculture = "t(Exiobase_TIV_n2o_agriculture_bp)", TIV_SF6 = "t(Exiobase_TIV_sf6_bp)", TIV_HFC = "t(Exiobase_TIV_hfc_bp)", @@ -4112,13 +4112,13 @@ for (i in years_exb_pxp){ # join domestic_TIVs with labels domestic_TIV_with_labels = cbind(Exiobase_T_labels, - Exiobase_TIV_country_breakdown_co2_bp, + Exiobase_TIV_country_breakdown_co2_combustion_bp, Exiobase_TIV_country_breakdown_co2_noncombustion_cement_bp %>% select(-country), Exiobase_TIV_country_breakdown_co2_noncombustion_lime_bp %>% select(-country), Exiobase_TIV_country_breakdown_co2_agriculture_peatdecay_bp %>% select(-country), Exiobase_TIV_country_breakdown_co2_waste_biogenic_bp %>% select(-country), Exiobase_TIV_country_breakdown_co2_waste_fossil_bp %>% select(-country), - Exiobase_TIV_country_breakdown_ch4_bp %>% select(-country), + Exiobase_TIV_country_breakdown_ch4_combustion_bp %>% select(-country), Exiobase_TIV_country_breakdown_ch4_noncombustion_gas_bp %>% select(-country), Exiobase_TIV_country_breakdown_ch4_noncombustion_oil_bp %>% select(-country), Exiobase_TIV_country_breakdown_ch4_noncombustion_anthracite_bp %>% select(-country), @@ -4129,7 +4129,7 @@ for (i in years_exb_pxp){ Exiobase_TIV_country_breakdown_ch4_noncombustion_oilrefinery_bp %>% select(-country), Exiobase_TIV_country_breakdown_ch4_agriculture_bp %>% select(-country), Exiobase_TIV_country_breakdown_ch4_waste_bp %>% select(-country), - Exiobase_TIV_country_breakdown_n2o_bp %>% select(-country), + Exiobase_TIV_country_breakdown_n2o_combustion_bp %>% select(-country), Exiobase_TIV_country_breakdown_n2o_agriculture_bp %>% select(-country), Exiobase_TIV_country_breakdown_sf6_bp %>% select(-country), Exiobase_TIV_country_breakdown_hfc_bp %>% select(-country), @@ -4142,13 +4142,13 @@ for (i in years_exb_pxp){ look_domestic = cbind(year_domestic,domestic_TIV_with_labels) %>% rename(country_of_production = V1, sector = V2, geo = country, year = year_domestic) %>% - mutate(TIV_CO2_domestic = as.numeric(TIV_CO2_domestic), + mutate(TIV_CO2_combustion_domestic = as.numeric(TIV_CO2_combustion_domestic), TIV_CO2_noncombustion_cement_domestic = as.numeric(TIV_CO2_noncombustion_cement_domestic), TIV_CO2_noncombustion_lime_domestic = as.numeric(TIV_CO2_noncombustion_lime_domestic), TIV_CO2_agriculture_peatdecay_domestic = as.numeric(TIV_CO2_agriculture_peatdecay_domestic), TIV_CO2_waste_biogenic_domestic = as.numeric(TIV_CO2_waste_biogenic_domestic), TIV_CO2_waste_fossil_domestic = as.numeric(TIV_CO2_waste_fossil_domestic), - TIV_CH4_domestic = as.numeric(TIV_CH4_domestic), + TIV_CH4_combustion_domestic = as.numeric(TIV_CH4_combustion_domestic), TIV_CH4_noncombustion_gas_domestic = as.numeric(TIV_CH4_noncombustion_gas_domestic), TIV_CH4_noncombustion_oil_domestic = as.numeric(TIV_CH4_noncombustion_oil_domestic), TIV_CH4_noncombustion_anthracite_domestic = as.numeric(TIV_CH4_noncombustion_anthracite_domestic), @@ -4159,7 +4159,7 @@ for (i in years_exb_pxp){ TIV_CH4_noncombustion_oilrefinery_domestic = as.numeric(TIV_CH4_noncombustion_oilrefinery_domestic), TIV_CH4_agriculture_domestic = as.numeric(TIV_CH4_agriculture_domestic), TIV_CH4_waste_domestic = as.numeric(TIV_CH4_waste_domestic), - TIV_N2O_domestic = as.numeric(TIV_N2O_domestic), + TIV_N2O_combustion_domestic = as.numeric(TIV_N2O_combustion_domestic), TIV_N2O_agriculture_domestic = as.numeric(TIV_N2O_agriculture_domestic), TIV_SF6_domestic = as.numeric(TIV_SF6_domestic), TIV_HFC_domestic = as.numeric(TIV_HFC_domestic), @@ -4171,13 +4171,13 @@ for (i in years_exb_pxp){ # europe TIVs with labels europe_TIV_with_labels = cbind(Exiobase_T_labels, - Exiobase_TIV_europe_breakdown_co2_bp, + Exiobase_TIV_europe_breakdown_co2_combustion-bp, Exiobase_TIV_europe_breakdown_co2_noncombustion_cement_bp, Exiobase_TIV_europe_breakdown_co2_noncombustion_lime_bp, Exiobase_TIV_europe_breakdown_co2_agriculture_peatdecay_bp, Exiobase_TIV_europe_breakdown_co2_waste_biogenic_bp, Exiobase_TIV_europe_breakdown_co2_waste_fossil_bp, - Exiobase_TIV_europe_breakdown_ch4_bp, + Exiobase_TIV_europe_breakdown_ch4_combustion_bp, Exiobase_TIV_europe_breakdown_ch4_noncombustion_gas_bp, Exiobase_TIV_europe_breakdown_ch4_noncombustion_oil_bp, Exiobase_TIV_europe_breakdown_ch4_noncombustion_anthracite_bp, @@ -4188,7 +4188,7 @@ for (i in years_exb_pxp){ Exiobase_TIV_europe_breakdown_ch4_noncombustion_oilrefinery_bp, Exiobase_TIV_europe_breakdown_ch4_agriculture_bp, Exiobase_TIV_europe_breakdown_ch4_waste_bp, - Exiobase_TIV_europe_breakdown_n2o_bp, + Exiobase_TIV_europe_breakdown_n2o_combustion_bp, Exiobase_TIV_europe_breakdown_n2o_agriculture_bp, Exiobase_TIV_europe_breakdown_sf6_bp, Exiobase_TIV_europe_breakdown_hfc_bp, @@ -4200,13 +4200,13 @@ for (i in years_exb_pxp){ look_europe = cbind(year_europe,europe_TIV_with_labels) %>% rename(country_of_production = V1, sector = V2, year = year_europe) %>% - mutate(TIV_CO2_europe = as.numeric(TIV_CO2_europe), + mutate(TIV_CO2_combustion_europe = as.numeric(TIV_CO2_combustion_europe), TIV_CO2_noncombustion_cement_europe = as.numeric(TIV_CO2_noncombustion_cement_europe), TIV_CO2_noncombustion_lime_europe = as.numeric(TIV_CO2_noncombustion_lime_europe), TIV_CO2_agriculture_peatdecay_europe = as.numeric(TIV_CO2_agriculture_peatdecay_europe), TIV_CO2_waste_biogenic_europe = as.numeric(TIV_CO2_waste_biogenic_europe), TIV_CO2_waste_fossil_europe = as.numeric(TIV_CO2_waste_fossil_europe), - TIV_CH4_europe = as.numeric(TIV_CH4_europe), + TIV_CH4_combustion_europe = as.numeric(TIV_CH4_combustion_europe), TIV_CH4_noncombustion_gas_europe = as.numeric(TIV_CH4_noncombustion_gas_europe), TIV_CH4_noncombustion_oil_europe = as.numeric(TIV_CH4_noncombustion_oil_europe), TIV_CH4_noncombustion_anthracite_europe = as.numeric(TIV_CH4_noncombustion_anthracite_europe), @@ -4217,7 +4217,7 @@ for (i in years_exb_pxp){ TIV_CH4_noncombustion_oilrefinery_europe = as.numeric(TIV_CH4_noncombustion_oilrefinery_europe), TIV_CH4_agriculture_europe = as.numeric(TIV_CH4_agriculture_europe), TIV_CH4_waste_europe = as.numeric(TIV_CH4_waste_europe), - TIV_N2O_europe = as.numeric(TIV_N2O_europe), + TIV_N2O_combustion_europe = as.numeric(TIV_N2O_combustion_europe), TIV_N2O_agriculture_europe = as.numeric(TIV_N2O_agriculture_europe), TIV_SF6_europe = as.numeric(TIV_SF6_europe), TIV_HFC_europe = as.numeric(TIV_HFC_europe), @@ -4234,7 +4234,7 @@ for (i in years_exb_pxp){ Exiobase_FD_labels = as.data.frame(t(read.csv(paste0(data_dir_exiobase, "/Exiobase_FD_labels_pxp.csv")))[-1,-3]) %>% mutate(V1 = dplyr::recode(V1,"GR" = "EL","GB" = "UK")) - national_CO2_footprints = Exiobase_FD * t(Exiobase_TIV_co2_bp) + national_CO2_combustion_footprints = Exiobase_FD * t(Exiobase_TIV_co2_combustion_bp) national_CO2_noncombustion_cement_footprints = Exiobase_FD * t(Exiobase_TIV_co2_noncombustion_cement_bp) @@ -4246,7 +4246,7 @@ for (i in years_exb_pxp){ national_CO2_waste_fossil_footprints = Exiobase_FD * t(Exiobase_TIV_co2_waste_fossil_bp) - national_CH4_footprints = Exiobase_FD * t(Exiobase_TIV_ch4_bp) + national_CH4_combustion_footprints = Exiobase_FD * t(Exiobase_TIV_ch4_combustion_bp) national_CH4_noncombustion_gas_footprints = Exiobase_FD * t(Exiobase_TIV_ch4_noncombustion_gas_bp) @@ -4268,7 +4268,7 @@ for (i in years_exb_pxp){ national_CH4_waste_footprints = Exiobase_FD * t(Exiobase_TIV_ch4_waste_bp) - national_N2O_footprints = Exiobase_FD * t(Exiobase_TIV_n2o_bp) + national_N2O_combustion_footprints = Exiobase_FD * t(Exiobase_TIV_n2o_combustion_bp) national_N2O_agriculture_footprints = Exiobase_FD * t(Exiobase_TIV_n2o_agriculture_bp) @@ -4284,13 +4284,13 @@ for (i in years_exb_pxp){ # together national_footprints_w_labels = cbind(Exiobase_FD_labels, - rowSums(t(national_CO2_footprints)), + rowSums(t(national_CO2_combustion_footprints)), rowSums(t(national_CO2_noncombustion_cement_footprints)), rowSums(t(national_CO2_noncombustion_lime_footprints)), rowSums(t(national_CO2_agriculture_peatdecay_footprints)), rowSums(t(national_CO2_waste_biogenic_footprints)), rowSums(t(national_CO2_waste_fossil_footprints)), - rowSums(t(national_CH4_footprints)), + rowSums(t(national_CH4_combustion_footprints)), rowSums(t(national_CH4_noncombustion_gas_footprints)), rowSums(t(national_CH4_noncombustion_oil_footprints)), rowSums(t(national_CH4_noncombustion_anthracite_footprints)), @@ -4301,7 +4301,7 @@ for (i in years_exb_pxp){ rowSums(t(national_CH4_noncombustion_oilrefinery_footprints)), rowSums(t(national_CH4_agriculture_footprints)), rowSums(t(national_CH4_waste_footprints)), - rowSums(t(national_N2O_footprints)), + rowSums(t(national_N2O_combustion_footprints)), rowSums(t(national_N2O_agriculture_footprints)), rowSums(t(national_SF6_footprints)), rowSums(t(national_HFC_footprints)), @@ -4319,13 +4319,13 @@ for (i in years_exb_pxp){ direct_FD_extensions = mapply(direct_FD_extensions, FUN = as.numeric) direct_FD_extensions = matrix(data=direct_FD_extensions,ncol=343,nrow=1104) - direct_FD_co2 = direct_FD_extensions[24,] + direct_FD_co2_combustion = direct_FD_extensions[24,] direct_FD_co2_noncombustion_cement = direct_FD_extensions[93,] direct_FD_co2_noncombustion_lime = direct_FD_extensions[94,] direct_FD_co2_agriculture_peatdecay = direct_FD_extensions[428,] direct_FD_co2_waste_biogenic = direct_FD_extensions[438,] direct_FD_co2_waste_fossil = direct_FD_extensions[439,] - direct_FD_ch4 = direct_FD_extensions[25,]*28 + direct_FD_ch4_combustion = direct_FD_extensions[25,]*28 direct_FD_ch4_noncombustion_gas = direct_FD_extensions[68,]*28 direct_FD_ch4_noncombustion_oil = direct_FD_extensions[69,]*28 direct_FD_ch4_noncombustion_anthracite = direct_FD_extensions[70,]*28 @@ -4336,7 +4336,7 @@ for (i in years_exb_pxp){ direct_FD_ch4_noncombustion_oilrefinery = direct_FD_extensions[75,]*28 direct_FD_ch4_agriculture = direct_FD_extensions[427,]*28 direct_FD_ch4_waste = direct_FD_extensions[436,]*28 - direct_FD_n2o = direct_FD_extensions[26,]*265 + direct_FD_n2o_combustion = direct_FD_extensions[26,]*265 direct_FD_n2o_agriculture = direct_FD_extensions[430,]*265 direct_FD_sf6 = direct_FD_extensions[424,]*23500 direct_FD_hfc = direct_FD_extensions[425,] @@ -4344,13 +4344,13 @@ for (i in years_exb_pxp){ direct_FD_energy = direct_FD_extensions[470,] - direct_FD_fp = data.frame(direct_FD_co2, + direct_FD_fp = data.frame(direct_FD_co2_combustion, direct_FD_co2_noncombustion_cement, direct_FD_co2_noncombustion_lime, direct_FD_co2_agriculture_peatdecay, direct_FD_co2_waste_biogenic, direct_FD_co2_waste_fossil, - direct_FD_ch4, + direct_FD_ch4_combustion, direct_FD_ch4_noncombustion_gas, direct_FD_ch4_noncombustion_oil, direct_FD_ch4_noncombustion_anthracite, @@ -4361,7 +4361,7 @@ for (i in years_exb_pxp){ direct_FD_ch4_noncombustion_oilrefinery, direct_FD_ch4_agriculture, direct_FD_ch4_waste, - direct_FD_n2o, + direct_FD_n2o_combustion, direct_FD_n2o_agriculture, direct_FD_sf6, direct_FD_hfc, @@ -4374,13 +4374,13 @@ for (i in years_exb_pxp){ rename(year = year_national_fp, geo = V1, fd_category = V2, - co2 = "rowSums(t(national_CO2_footprints))", + co2_combustion = "rowSums(t(national_CO2_combustion_footprints))", co2_noncombustion_cement = "rowSums(t(national_CO2_noncombustion_cement_footprints))", co2_noncombustion_lime = "rowSums(t(national_CO2_noncombustion_lime_footprints))", co2_agriculture_peatdecay = "rowSums(t(national_CO2_agriculture_peatdecay_footprints))", co2_waste_biogenic = "rowSums(t(national_CO2_waste_biogenic_footprints))", co2_waste_fossil = "rowSums(t(national_CO2_waste_fossil_footprints))", - ch4 = "rowSums(t(national_CH4_footprints))", + ch4_combustion = "rowSums(t(national_CH4_combustion_footprints))", ch4_noncombustion_gas = "rowSums(t(national_CH4_noncombustion_gas_footprints))", ch4_noncombustion_oil = "rowSums(t(national_CH4_noncombustion_oil_footprints))", ch4_noncombustion_anthracite = "rowSums(t(national_CH4_noncombustion_anthracite_footprints))", @@ -4391,7 +4391,7 @@ for (i in years_exb_pxp){ ch4_noncombustion_oilrefinery = "rowSums(t(national_CH4_noncombustion_oilrefinery_footprints))", ch4_agriculture = "rowSums(t(national_CH4_agriculture_footprints))", ch4_waste = "rowSums(t(national_CH4_waste_footprints))", - n2o = "rowSums(t(national_N2O_footprints))", + n2o_combustion = "rowSums(t(national_N2O_combustion_footprints))", n2o_agriculture = "rowSums(t(national_N2O_agriculture_footprints))", sf6 = "rowSums(t(national_SF6_footprints))", hfc = "rowSums(t(national_HFC_footprints))", @@ -4400,8 +4400,8 @@ for (i in years_exb_pxp){ select(year, geo, fd_category, - co2, - direct_FD_co2, + co2_combustion, + direct_FD_co2_combustion, co2_noncombustion_cement, direct_FD_co2_noncombustion_cement, co2_noncombustion_lime, @@ -4412,8 +4412,8 @@ for (i in years_exb_pxp){ direct_FD_co2_waste_biogenic, co2_waste_fossil, direct_FD_co2_waste_fossil, - ch4, - direct_FD_ch4, + ch4_combustion, + direct_FD_ch4_combustion, ch4_noncombustion_gas, direct_FD_ch4_noncombustion_gas, ch4_noncombustion_oil, @@ -4434,8 +4434,8 @@ for (i in years_exb_pxp){ direct_FD_ch4_agriculture, ch4_waste, direct_FD_ch4_waste, - n2o, - direct_FD_n2o, + n2o_combustion, + direct_FD_n2o_combustion, n2o_agriculture, direct_FD_n2o_agriculture, sf6, @@ -4539,13 +4539,13 @@ for (i in years_exb_pxp){ t(HFC_air), t(PFC_air), t(energy_carrier_use)) %>% - rename(CO2 = 1, + rename(CO2_combustion = 1, CO2_noncombustion_cement = 2, CO2_noncombustion_lime = 3, CO2_agriculture_peatdecay = 4, CO2_waste_biogenic = 5, CO2_waste_fossil = 6, - CH4 = 7, + CH4_combustion = 7, CH4_noncombustion_gas = 8, CH4_noncombustion_oil = 9, CH4_noncombustion_anthracite = 10, @@ -4556,7 +4556,7 @@ for (i in years_exb_pxp){ CH4_noncombustion_oilrefinery = 15, CH4_agriculture = 16, CH4_waste = 17, - N2O = 18, + N2O_combustion = 18, N2O_agriculture = 19, SF6 = 20, HFC = 21, PFC = 22, energy = 23) @@ -4719,13 +4719,13 @@ direct_FD_fp_long = national_fp %>% "PT" , "TR" , "SK" , "SI" , "SE" , "RO" , "NO")) %>% - select(year,geo,fd_category,direct_FD_co2, + select(year,geo,fd_category,direct_FD_co2_combustion, direct_FD_co2_noncombustion_cement, direct_FD_co2_noncombustion_lime, direct_FD_co2_agriculture_peatdecay, direct_FD_co2_waste_biogenic, direct_FD_co2_waste_fossil, - direct_FD_ch4, + direct_FD_ch4_combustion, direct_FD_ch4_noncombustion_gas, direct_FD_ch4_noncombustion_oil, direct_FD_ch4_noncombustion_anthracite, @@ -4736,7 +4736,7 @@ direct_FD_fp_long = national_fp %>% direct_FD_ch4_noncombustion_oilrefinery, direct_FD_ch4_agriculture, direct_FD_ch4_waste, - direct_FD_n2o, + direct_FD_n2o_combustion, direct_FD_n2o_agriculture, direct_FD_sf6, direct_FD_hfc, @@ -4755,13 +4755,13 @@ direct_FD_fp_long_disagg = cbind(sector,direct_FD_fp_long) %>% left_join(env_ac_ainah_r2_ch4, by = c("geo","sector")) %>% left_join(env_ac_ainah_r2_n2o, by = c("geo","sector")) %>% left_join(env_ac_pefasu, by = c("geo","sector")) %>% - mutate(direct_FD_co2 = (direct_FD_co2 + + mutate(direct_FD_co2 = (direct_FD_co2_combustion + direct_FD_co2_noncombustion_cement + direct_FD_co2_noncombustion_lime + direct_FD_co2_agriculture_peatdecay + direct_FD_co2_waste_biogenic + direct_FD_co2_waste_fossil)*share_of_total_co2, - direct_FD_ch4 = (direct_FD_ch4 + + direct_FD_ch4 = (direct_FD_ch4_combustion + direct_FD_ch4_noncombustion_gas + direct_FD_ch4_noncombustion_oil + direct_FD_ch4_noncombustion_anthracite + @@ -4772,7 +4772,7 @@ direct_FD_fp_long_disagg = cbind(sector,direct_FD_fp_long) %>% direct_FD_ch4_noncombustion_oilrefinery + direct_FD_ch4_agriculture + direct_FD_ch4_waste)*share_of_total_ch4, - direct_FD_n2o = (direct_FD_n2o + + direct_FD_n2o = (direct_FD_n2o_combustion + direct_FD_n2o_agriculture)*share_of_total_n2o, direct_FD_energy = direct_FD_energy*share_of_total_energy) %>% left_join(shares, by = c("year","geo","coicop")) %>% @@ -4926,7 +4926,7 @@ results = fd_exiobase %>% QUINTILE4, QUINTILE5, fd_total = QUINTILE1+QUINTILE2+QUINTILE3+QUINTILE4+QUINTILE5, - TIV_CO2 = TIV_CO2 + + TIV_CO2 = TIV_CO2_combustion + TIV_CO2_noncombustion_cement + TIV_CO2_noncombustion_lime + TIV_CO2_agriculture_peatdecay + @@ -4938,7 +4938,7 @@ results = fd_exiobase %>% q4_co2 = QUINTILE4*TIV_CO2, q5_co2 = QUINTILE5*TIV_CO2, co2_total = q1_co2+q2_co2+q3_co2+q4_co2+q5_co2, - TIV_CO2_domestic = TIV_CO2_domestic + + TIV_CO2_domestic = TIV_CO2_combustion_domestic + TIV_CO2_noncombustion_cement_domestic + TIV_CO2_noncombustion_lime_domestic + TIV_CO2_agriculture_peatdecay_domestic + @@ -4950,7 +4950,7 @@ results = fd_exiobase %>% q4_co2_domestic = QUINTILE4*TIV_CO2_domestic, q5_co2_domestic = QUINTILE5*TIV_CO2_domestic, co2_total_domestic = q1_co2_domestic+q2_co2_domestic+q3_co2_domestic+q4_co2_domestic+q5_co2_domestic, - TIV_CO2_europe = TIV_CO2_europe + + TIV_CO2_europe = TIV_CO2_combustion_europe + TIV_CO2_noncombustion_cement_europe + TIV_CO2_noncombustion_lime_europe + TIV_CO2_agriculture_peatdecay_europe + @@ -4963,7 +4963,7 @@ results = fd_exiobase %>% q5_co2_europe = QUINTILE5*(TIV_CO2_europe - TIV_CO2_domestic), co2_total_europe = q1_co2_europe+q2_co2_europe+q3_co2_europe+q4_co2_europe+q5_co2_europe, TIV_CO2eq = TIV_CO2 + - TIV_CH4 + + TIV_CH4_combustion + TIV_CH4_noncombustion_gas + TIV_CH4_noncombustion_oil + TIV_CH4_noncombustion_anthracite + @@ -4974,7 +4974,7 @@ results = fd_exiobase %>% TIV_CH4_noncombustion_oilrefinery + TIV_CH4_agriculture + TIV_CH4_waste + - TIV_N2O + + TIV_N2O_combustion + TIV_N2O_agriculture + TIV_SF6 + TIV_HFC + TIV_PFC, q1_co2eq = QUINTILE1*TIV_CO2eq, @@ -4984,7 +4984,7 @@ results = fd_exiobase %>% q5_co2eq = QUINTILE5*TIV_CO2eq, co2eq_total = q1_co2eq + q2_co2eq + q3_co2eq + q4_co2eq + q5_co2eq, TIV_CO2eq_domestic = TIV_CO2_domestic + - TIV_CH4_domestic + + TIV_CH4_combustion_domestic + TIV_CH4_noncombustion_gas_domestic + TIV_CH4_noncombustion_oil_domestic + TIV_CH4_noncombustion_anthracite_domestic + @@ -4995,7 +4995,7 @@ results = fd_exiobase %>% TIV_CH4_noncombustion_oilrefinery_domestic + TIV_CH4_agriculture_domestic + TIV_CH4_waste_domestic + - TIV_N2O_domestic + + TIV_N2O_combustion_domestic + TIV_N2O_agriculture_domestic + TIV_SF6_domestic + TIV_HFC_domestic + TIV_PFC_domestic, q1_co2eq_domestic = QUINTILE1*TIV_CO2eq_domestic, @@ -5005,7 +5005,7 @@ results = fd_exiobase %>% q5_co2eq_domestic = QUINTILE5*TIV_CO2eq_domestic, co2eq_total_domestic = q1_co2eq_domestic + q2_co2eq_domestic + q3_co2eq_domestic + q4_co2eq_domestic + q5_co2eq_domestic, TIV_CO2eq_europe = TIV_CO2_europe + - TIV_CH4_europe + + TIV_CH4_combustion_europe + TIV_CH4_noncombustion_gas_europe + TIV_CH4_noncombustion_oil_europe + TIV_CH4_noncombustion_anthracite_europe + @@ -5016,7 +5016,7 @@ results = fd_exiobase %>% TIV_CH4_noncombustion_oilrefinery_europe + TIV_CH4_agriculture_europe + TIV_CH4_waste_europe + - TIV_N2O_europe + + TIV_N2O_combustion_europe + TIV_N2O_agriculture_europe + TIV_SF6_europe + TIV_HFC_europe + TIV_PFC_europe, q1_co2eq_europe = QUINTILE1*(TIV_CO2eq_europe - TIV_CO2eq_domestic), @@ -5662,16 +5662,16 @@ for (i in years_exb_ixi){ # CO2 - combustion - air - Exiobase_TIV_co2_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_co2_combustion_air_",year_current,"_ixi.csv"))[,-1] + Exiobase_TIV_co2_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_co2_combustion_air_",year_current,"_ixi.csv"))[,-1] - Exiobase_TIV_country_breakdown_co2_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_co2_combustion_air_", year_current,"_ixi.csv"))[,-1] %>% + Exiobase_TIV_country_breakdown_co2_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_co2_combustion_air_", year_current,"_ixi.csv"))[,-1] %>% row_to_names(row_number = 1) %>% - gather(country, TIV_CO2_domestic) + gather(country, TIV_CO2_combustion_domestic) - Exiobase_TIV_europe_breakdown_co2_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_co2_combustion_air_", year_current,"_ixi.csv"))[,-1] %>% + Exiobase_TIV_europe_breakdown_co2_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_co2_combustion_air_", year_current,"_ixi.csv"))[,-1] %>% row_to_names(row_number = 1) %>% mutate_at(vars(AT:ZA), funs(as.numeric(as.character(.)))) %>% - mutate(TIV_CO2_europe = AT + + mutate(TIV_CO2_combustion_europe = AT + BE + BG + CY + CZ + DE + DK + EE + ES + FI + FR + @@ -5682,13 +5682,13 @@ for (i in years_exb_ixi){ PT + TR + SK + SI + SE + RO + NO, - TIV_CO2_not_europe = AU + + TIV_CO2_combustion_not_europe = AU + BR + CA + CH + CN + ID + IN + JP + KR + MX + RU + TW + US + WA + WE + WF + WL + WM + ZA) %>% - select(TIV_CO2_europe,TIV_CO2_not_europe) + select(TIV_CO2_combustion_europe,TIV_CO2_combustion_not_europe) # CO2 - noncombustion - cement - air @@ -5843,16 +5843,16 @@ for (i in years_exb_ixi){ # CH4 - combustion -air - Exiobase_TIV_ch4_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_ch4_CO2eq_combustion_air_",year_current,"_ixi.csv"))[,-1] + Exiobase_TIV_ch4_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_ch4_CO2eq_combustion_air_",year_current,"_ixi.csv"))[,-1] - Exiobase_TIV_country_breakdown_ch4_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_ch4_CO2eq_combustion_air_", year_current, "_ixi.csv"))[,-1] %>% + Exiobase_TIV_country_breakdown_ch4_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_ch4_CO2eq_combustion_air_", year_current, "_ixi.csv"))[,-1] %>% row_to_names(row_number = 1) %>% - gather(country, TIV_CH4_domestic) + gather(country, TIV_CH4_combustion_domestic) - Exiobase_TIV_europe_breakdown_ch4_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_ch4_CO2eq_combustion_air_", year_current, "_ixi.csv"))[,-1] %>% + Exiobase_TIV_europe_breakdown_ch4_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_ch4_CO2eq_combustion_air_", year_current, "_ixi.csv"))[,-1] %>% row_to_names(row_number = 1) %>% mutate_at(vars(AT:ZA), funs(as.numeric(as.character(.)))) %>% - mutate(TIV_CH4_europe = AT + + mutate(TIV_CH4_combustion_europe = AT + BE + BG + CY + CZ + DE + DK + EE + ES + FI + FR + @@ -5863,13 +5863,13 @@ for (i in years_exb_ixi){ PT + TR + SK + SI + SE + RO + NO, - TIV_CH4_not_europe = AU + + TIV_CH4_combustion_not_europe = AU + BR + CA + CH + CN + ID + IN + JP + KR + MX + RU + TW + US + WA + WE + WF + WL + WM + ZA) %>% - select(TIV_CH4_europe,TIV_CH4_not_europe) + select(TIV_CH4_combustion_europe,TIV_CH4_combustion_not_europe) # CH4 - noncombustion - gas - air @@ -6174,16 +6174,16 @@ for (i in years_exb_ixi){ # N2O - combustion - air - Exiobase_TIV_n2o_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_n2o_CO2eq_combustion_air_",year_current,"_ixi.csv"))[,-1] + Exiobase_TIV_n2o_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_n2o_CO2eq_combustion_air_",year_current,"_ixi.csv"))[,-1] - Exiobase_TIV_country_breakdown_n2o_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_n2o_CO2eq_combustion_air_",year_current,"_ixi.csv"))[,-1] %>% + Exiobase_TIV_country_breakdown_n2o_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_n2o_CO2eq_combustion_air_",year_current,"_ixi.csv"))[,-1] %>% row_to_names(row_number = 1) %>% - gather(country, TIV_N2O_domestic) + gather(country, TIV_N2O_combustion_domestic) - Exiobase_TIV_europe_breakdown_n2o_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_n2o_CO2eq_combustion_air_",year_current,"_ixi.csv"))[,-1] %>% + Exiobase_TIV_europe_breakdown_n2o_combustion_bp = read.csv(paste0(data_dir_exiobase, "/IOT_",year_current,"_ixi/TIV_country_breakdown_n2o_CO2eq_combustion_air_",year_current,"_ixi.csv"))[,-1] %>% row_to_names(row_number = 1) %>% mutate_at(vars(AT:ZA), funs(as.numeric(as.character(.)))) %>% - mutate(TIV_N2O_europe = AT + + mutate(TIV_N2O_combustion_europe = AT + BE + BG + CY + CZ + DE + DK + EE + ES + FI + FR + @@ -6194,13 +6194,13 @@ for (i in years_exb_ixi){ PT + TR + SK + SI + SE + RO + NO, - TIV_N2O_not_europe = AU + + TIV_N2O_combustion_not_europe = AU + BR + CA + CH + CN + ID + IN + JP + KR + MX + RU + TW + US + WA + WE + WF + WL + WM + ZA) %>% - select(TIV_N2O_europe,TIV_N2O_not_europe) + select(TIV_N2O_combustion_europe,TIV_N2O_combustion_not_europe) # N2O - agriculture - air @@ -6355,13 +6355,13 @@ for (i in years_exb_ixi){ # join with labels TIV_with_labels = cbind(Exiobase_T_labels, - t(Exiobase_TIV_co2_bp), + t(Exiobase_TIV_co2_combustion_bp), t(Exiobase_TIV_co2_noncombustion_cement_bp), t(Exiobase_TIV_co2_noncombustion_lime_bp), t(Exiobase_TIV_co2_agriculture_peatdecay_bp), t(Exiobase_TIV_co2_waste_biogenic_bp), t(Exiobase_TIV_co2_waste_fossil_bp), - t(Exiobase_TIV_ch4_bp), + t(Exiobase_TIV_ch4_combustion_bp), t(Exiobase_TIV_ch4_noncombustion_gas_bp), t(Exiobase_TIV_ch4_noncombustion_oil_bp), t(Exiobase_TIV_ch4_noncombustion_anthracite_bp), @@ -6372,19 +6372,19 @@ for (i in years_exb_ixi){ t(Exiobase_TIV_ch4_noncombustion_oilrefinery_bp), t(Exiobase_TIV_ch4_agriculture_bp), t(Exiobase_TIV_ch4_waste_bp), - t(Exiobase_TIV_n2o_bp), + t(Exiobase_TIV_n2o_combustion_bp), t(Exiobase_TIV_n2o_agriculture_bp), t(Exiobase_TIV_sf6_bp), t(Exiobase_TIV_hfc_bp), t(Exiobase_TIV_pfc_bp), t(Exiobase_TIV_energy_use_bp)) %>% - rename(TIV_CO2 = "t(Exiobase_TIV_co2_bp)", + rename(TIV_CO2_combustion = "t(Exiobase_TIV_co2_combustion_bp)", TIV_CO2_noncombustion_cement = "t(Exiobase_TIV_co2_noncombustion_cement_bp)", TIV_CO2_noncombustion_lime = "t(Exiobase_TIV_co2_noncombustion_lime_bp)", TIV_CO2_agriculture_peatdecay = "t(Exiobase_TIV_co2_agriculture_peatdecay_bp)", TIV_CO2_waste_biogenic = "t(Exiobase_TIV_co2_waste_biogenic_bp)", TIV_CO2_waste_fossil = "t(Exiobase_TIV_co2_waste_fossil_bp)", - TIV_CH4 = "t(Exiobase_TIV_ch4_bp)", + TIV_CH4_combustion = "t(Exiobase_TIV_ch4_combustion_bp)", TIV_CH4_noncombustion_gas = "t(Exiobase_TIV_ch4_noncombustion_gas_bp)", TIV_CH4_noncombustion_oil = "t(Exiobase_TIV_ch4_noncombustion_oil_bp)", TIV_CH4_noncombustion_anthracite = "t(Exiobase_TIV_ch4_noncombustion_anthracite_bp)", @@ -6395,7 +6395,7 @@ for (i in years_exb_ixi){ TIV_CH4_noncombustion_oilrefinery = "t(Exiobase_TIV_ch4_noncombustion_oilrefinery_bp)", TIV_CH4_agriculture = "t(Exiobase_TIV_ch4_agriculture_bp)", TIV_CH4_waste = "t(Exiobase_TIV_ch4_waste_bp)", - TIV_N2O = "t(Exiobase_TIV_n2o_bp)", + TIV_N2O_combustion = "t(Exiobase_TIV_n2o_combustion_bp)", TIV_N2O_agriculture = "t(Exiobase_TIV_n2o_agriculture_bp)", TIV_SF6 = "t(Exiobase_TIV_sf6_bp)", TIV_HFC = "t(Exiobase_TIV_hfc_bp)", @@ -6413,13 +6413,13 @@ for (i in years_exb_ixi){ # domestic TIVs domestic_TIV_with_labels = cbind(Exiobase_T_labels, - Exiobase_TIV_country_breakdown_co2_bp, + Exiobase_TIV_country_breakdown_co2_combustion_bp, Exiobase_TIV_country_breakdown_co2_noncombustion_cement_bp %>% select(-country), Exiobase_TIV_country_breakdown_co2_noncombustion_lime_bp %>% select(-country), Exiobase_TIV_country_breakdown_co2_agriculture_peatdecay_bp %>% select(-country), Exiobase_TIV_country_breakdown_co2_waste_biogenic_bp %>% select(-country), Exiobase_TIV_country_breakdown_co2_waste_fossil_bp %>% select(-country), - Exiobase_TIV_country_breakdown_ch4_bp %>% select(-country), + Exiobase_TIV_country_breakdown_ch4_combustion_bp %>% select(-country), Exiobase_TIV_country_breakdown_ch4_noncombustion_gas_bp %>% select(-country), Exiobase_TIV_country_breakdown_ch4_noncombustion_oil_bp %>% select(-country), Exiobase_TIV_country_breakdown_ch4_noncombustion_anthracite_bp %>% select(-country), @@ -6430,7 +6430,7 @@ for (i in years_exb_ixi){ Exiobase_TIV_country_breakdown_ch4_noncombustion_oilrefinery_bp %>% select(-country), Exiobase_TIV_country_breakdown_ch4_agriculture_bp %>% select(-country), Exiobase_TIV_country_breakdown_ch4_waste_bp %>% select(-country), - Exiobase_TIV_country_breakdown_n2o_bp %>% select(-country), + Exiobase_TIV_country_breakdown_n2o_combustion_bp %>% select(-country), Exiobase_TIV_country_breakdown_n2o_agriculture_bp %>% select(-country), Exiobase_TIV_country_breakdown_sf6_bp %>% select(-country), Exiobase_TIV_country_breakdown_hfc_bp %>% select(-country), @@ -6443,13 +6443,13 @@ for (i in years_exb_ixi){ look_domestic = cbind(year_domestic,domestic_TIV_with_labels) %>% rename(country_of_production = V1, sector = V2, geo = country, year = year_domestic) %>% - mutate(TIV_CO2_domestic = as.numeric(TIV_CO2_domestic), + mutate(TIV_CO2_combustion_domestic = as.numeric(TIV_CO2_combustion_domestic), TIV_CO2_noncombustion_cement_domestic = as.numeric(TIV_CO2_noncombustion_cement_domestic), TIV_CO2_noncombustion_lime_domestic = as.numeric(TIV_CO2_noncombustion_lime_domestic), TIV_CO2_agriculture_peatdecay_domestic = as.numeric(TIV_CO2_agriculture_peatdecay_domestic), TIV_CO2_waste_biogenic_domestic = as.numeric(TIV_CO2_waste_biogenic_domestic), TIV_CO2_waste_fossil_domestic = as.numeric(TIV_CO2_waste_fossil_domestic), - TIV_CH4_domestic = as.numeric(TIV_CH4_domestic), + TIV_CH4_combustion_domestic = as.numeric(TIV_CH4_combustion_domestic), TIV_CH4_noncombustion_gas_domestic = as.numeric(TIV_CH4_noncombustion_gas_domestic), TIV_CH4_noncombustion_oil_domestic = as.numeric(TIV_CH4_noncombustion_oil_domestic), TIV_CH4_noncombustion_anthracite_domestic = as.numeric(TIV_CH4_noncombustion_anthracite_domestic), @@ -6460,7 +6460,7 @@ for (i in years_exb_ixi){ TIV_CH4_noncombustion_oilrefinery_domestic = as.numeric(TIV_CH4_noncombustion_oilrefinery_domestic), TIV_CH4_agriculture_domestic = as.numeric(TIV_CH4_agriculture_domestic), TIV_CH4_waste_domestic = as.numeric(TIV_CH4_waste_domestic), - TIV_N2O_domestic = as.numeric(TIV_N2O_domestic), + TIV_N2O_combustion_domestic = as.numeric(TIV_N2O_combustion_domestic), TIV_N2O_agriculture_domestic = as.numeric(TIV_N2O_agriculture_domestic), TIV_SF6_domestic = as.numeric(TIV_SF6_domestic), TIV_HFC_domestic = as.numeric(TIV_HFC_domestic), @@ -6472,13 +6472,13 @@ for (i in years_exb_ixi){ # europe TIVs with labels europe_TIV_with_labels = cbind(Exiobase_T_labels, - Exiobase_TIV_europe_breakdown_co2_bp, + Exiobase_TIV_europe_breakdown_co2_combustion_bp, Exiobase_TIV_europe_breakdown_co2_noncombustion_cement_bp, Exiobase_TIV_europe_breakdown_co2_noncombustion_lime_bp, Exiobase_TIV_europe_breakdown_co2_agriculture_peatdecay_bp, Exiobase_TIV_europe_breakdown_co2_waste_biogenic_bp, Exiobase_TIV_europe_breakdown_co2_waste_fossil_bp, - Exiobase_TIV_europe_breakdown_ch4_bp, + Exiobase_TIV_europe_breakdown_ch4_combustion_bp, Exiobase_TIV_europe_breakdown_ch4_noncombustion_gas_bp, Exiobase_TIV_europe_breakdown_ch4_noncombustion_oil_bp, Exiobase_TIV_europe_breakdown_ch4_noncombustion_anthracite_bp, @@ -6489,7 +6489,7 @@ for (i in years_exb_ixi){ Exiobase_TIV_europe_breakdown_ch4_noncombustion_oilrefinery_bp, Exiobase_TIV_europe_breakdown_ch4_agriculture_bp, Exiobase_TIV_europe_breakdown_ch4_waste_bp, - Exiobase_TIV_europe_breakdown_n2o_bp, + Exiobase_TIV_europe_breakdown_n2o_combustion_bp, Exiobase_TIV_europe_breakdown_n2o_agriculture_bp, Exiobase_TIV_europe_breakdown_sf6_bp, Exiobase_TIV_europe_breakdown_hfc_bp, @@ -6501,13 +6501,13 @@ for (i in years_exb_ixi){ look_europe = cbind(year_europe,europe_TIV_with_labels) %>% rename(country_of_production = V1, sector = V2, year = year_europe) %>% - mutate(TIV_CO2_europe = as.numeric(TIV_CO2_europe), + mutate(TIV_CO2_combustion_europe = as.numeric(TIV_CO2_combustion_europe), TIV_CO2_noncombustion_cement_europe = as.numeric(TIV_CO2_noncombustion_cement_europe), TIV_CO2_noncombustion_lime_europe = as.numeric(TIV_CO2_noncombustion_lime_europe), TIV_CO2_agriculture_peatdecay_europe = as.numeric(TIV_CO2_agriculture_peatdecay_europe), TIV_CO2_waste_biogenic_europe = as.numeric(TIV_CO2_waste_biogenic_europe), TIV_CO2_waste_fossil_europe = as.numeric(TIV_CO2_waste_fossil_europe), - TIV_CH4_europe = as.numeric(TIV_CH4_europe), + TIV_CH4_combustion_europe = as.numeric(TIV_CH4_combustion_europe), TIV_CH4_noncombustion_gas_europe = as.numeric(TIV_CH4_noncombustion_gas_europe), TIV_CH4_noncombustion_oil_europe = as.numeric(TIV_CH4_noncombustion_oil_europe), TIV_CH4_noncombustion_anthracite_europe = as.numeric(TIV_CH4_noncombustion_anthracite_europe), @@ -6518,7 +6518,7 @@ for (i in years_exb_ixi){ TIV_CH4_noncombustion_oilrefinery_europe = as.numeric(TIV_CH4_noncombustion_oilrefinery_europe), TIV_CH4_agriculture_europe = as.numeric(TIV_CH4_agriculture_europe), TIV_CH4_waste_europe = as.numeric(TIV_CH4_waste_europe), - TIV_N2O_europe = as.numeric(TIV_N2O_europe), + TIV_N2O_combustion_europe = as.numeric(TIV_N2O_combustion_europe), TIV_N2O_agriculture_europe = as.numeric(TIV_N2O_agriculture_europe), TIV_SF6_europe = as.numeric(TIV_SF6_europe), TIV_HFC_europe = as.numeric(TIV_HFC_europe), @@ -6534,7 +6534,7 @@ for (i in years_exb_ixi){ Exiobase_FD_labels = as.data.frame(t(read.csv(paste0(data_dir_exiobase, "/Exiobase_FD_labels_ixi.csv")))[-1,-3]) %>% mutate(V1 = dplyr::recode(V1,"GR" = "EL","GB" = "UK")) - national_CO2_footprints = Exiobase_FD * t(Exiobase_TIV_co2_bp) + national_CO2_combustion_footprints = Exiobase_FD * t(Exiobase_TIV_co2_combustion_bp) national_CO2_noncombustion_cement_footprints = Exiobase_FD * t(Exiobase_TIV_co2_noncombustion_cement_bp) @@ -6546,7 +6546,7 @@ for (i in years_exb_ixi){ national_CO2_waste_fossil_footprints = Exiobase_FD * t(Exiobase_TIV_co2_waste_fossil_bp) - national_CH4_footprints = Exiobase_FD * t(Exiobase_TIV_ch4_bp) + national_CH4_combustion_footprints = Exiobase_FD * t(Exiobase_TIV_ch4_combustion_bp) national_CH4_noncombustion_gas_footprints = Exiobase_FD * t(Exiobase_TIV_ch4_noncombustion_gas_bp) @@ -6568,7 +6568,7 @@ for (i in years_exb_ixi){ national_CH4_waste_footprints = Exiobase_FD * t(Exiobase_TIV_ch4_waste_bp) - national_N2O_footprints = Exiobase_FD * t(Exiobase_TIV_n2o_bp) + national_N2O_combustion_footprints = Exiobase_FD * t(Exiobase_TIV_n2o_combustion_bp) national_N2O_agriculture_footprints = Exiobase_FD * t(Exiobase_TIV_n2o_agriculture_bp) @@ -6584,13 +6584,13 @@ for (i in years_exb_ixi){ # together national_footprints_w_labels = cbind(Exiobase_FD_labels, - rowSums(t(national_CO2_footprints)), + rowSums(t(national_CO2_combustion_footprints)), rowSums(t(national_CO2_noncombustion_cement_footprints)), rowSums(t(national_CO2_noncombustion_lime_footprints)), rowSums(t(national_CO2_agriculture_peatdecay_footprints)), rowSums(t(national_CO2_waste_biogenic_footprints)), rowSums(t(national_CO2_waste_fossil_footprints)), - rowSums(t(national_CH4_footprints)), + rowSums(t(national_CH4_combustion_footprints)), rowSums(t(national_CH4_noncombustion_gas_footprints)), rowSums(t(national_CH4_noncombustion_oil_footprints)), rowSums(t(national_CH4_noncombustion_anthracite_footprints)), @@ -6601,7 +6601,7 @@ for (i in years_exb_ixi){ rowSums(t(national_CH4_noncombustion_oilrefinery_footprints)), rowSums(t(national_CH4_agriculture_footprints)), rowSums(t(national_CH4_waste_footprints)), - rowSums(t(national_N2O_footprints)), + rowSums(t(national_N2O_combustion_footprints)), rowSums(t(national_N2O_agriculture_footprints)), rowSums(t(national_SF6_footprints)), rowSums(t(national_HFC_footprints)), @@ -6618,13 +6618,13 @@ for (i in years_exb_ixi){ direct_FD_extensions = mapply(direct_FD_extensions, FUN = as.numeric) direct_FD_extensions = matrix(data=direct_FD_extensions,ncol=343,nrow=1113) - direct_FD_co2 = direct_FD_extensions[24,] + direct_FD_co2_combustion = direct_FD_extensions[24,] direct_FD_co2_noncombustion_cement = direct_FD_extensions[93,] direct_FD_co2_noncombustion_lime = direct_FD_extensions[94,] direct_FD_co2_agriculture_peatdecay = direct_FD_extensions[428,] direct_FD_co2_waste_biogenic = direct_FD_extensions[438,] direct_FD_co2_waste_fossil = direct_FD_extensions[439,] - direct_FD_ch4 = direct_FD_extensions[25,]*28 + direct_FD_ch4_combustion = direct_FD_extensions[25,]*28 direct_FD_ch4_noncombustion_gas = direct_FD_extensions[68,]*28 direct_FD_ch4_noncombustion_oil = direct_FD_extensions[69,]*28 direct_FD_ch4_noncombustion_anthracite = direct_FD_extensions[70,]*28 @@ -6635,7 +6635,7 @@ for (i in years_exb_ixi){ direct_FD_ch4_noncombustion_oilrefinery = direct_FD_extensions[75,]*28 direct_FD_ch4_agriculture = direct_FD_extensions[427,]*28 direct_FD_ch4_waste = direct_FD_extensions[436,]*28 - direct_FD_n2o = direct_FD_extensions[26,]*265 + direct_FD_n2o_combustion = direct_FD_extensions[26,]*265 direct_FD_n2o_agriculture = direct_FD_extensions[430,]*265 direct_FD_sf6 = direct_FD_extensions[424,]*23500 direct_FD_hfc = direct_FD_extensions[425,] @@ -6643,13 +6643,13 @@ for (i in years_exb_ixi){ direct_FD_energy = direct_FD_extensions[470,] - direct_FD_fp = data.frame(direct_FD_co2, + direct_FD_fp = data.frame(direct_FD_co2_combustion, direct_FD_co2_noncombustion_cement, direct_FD_co2_noncombustion_lime, direct_FD_co2_agriculture_peatdecay, direct_FD_co2_waste_biogenic, direct_FD_co2_waste_fossil, - direct_FD_ch4, + direct_FD_ch4_combustion, direct_FD_ch4_noncombustion_gas, direct_FD_ch4_noncombustion_oil, direct_FD_ch4_noncombustion_anthracite, @@ -6660,7 +6660,7 @@ for (i in years_exb_ixi){ direct_FD_ch4_noncombustion_oilrefinery, direct_FD_ch4_agriculture, direct_FD_ch4_waste, - direct_FD_n2o, + direct_FD_n2o-combustion, direct_FD_n2o_agriculture, direct_FD_sf6, direct_FD_hfc, @@ -6673,13 +6673,13 @@ for (i in years_exb_ixi){ rename(year = year_national_fp, geo = V1, fd_category = V2, - co2 = "rowSums(t(national_CO2_footprints))", + co2_combustion = "rowSums(t(national_CO2_combustion_footprints))", co2_noncombustion_cement = "rowSums(t(national_CO2_noncombustion_cement_footprints))", co2_noncombustion_lime = "rowSums(t(national_CO2_noncombustion_lime_footprints))", co2_agriculture_peatdecay = "rowSums(t(national_CO2_agriculture_peatdecay_footprints))", co2_waste_biogenic = "rowSums(t(national_CO2_waste_biogenic_footprints))", co2_waste_fossil = "rowSums(t(national_CO2_waste_fossil_footprints))", - ch4 = "rowSums(t(national_CH4_footprints))", + ch4_combustion = "rowSums(t(national_CH4_combustion_footprints))", ch4_noncombustion_gas = "rowSums(t(national_CH4_noncombustion_gas_footprints))", ch4_noncombustion_oil = "rowSums(t(national_CH4_noncombustion_oil_footprints))", ch4_noncombustion_anthracite = "rowSums(t(national_CH4_noncombustion_anthracite_footprints))", @@ -6690,7 +6690,7 @@ for (i in years_exb_ixi){ ch4_noncombustion_oilrefinery = "rowSums(t(national_CH4_noncombustion_oilrefinery_footprints))", ch4_agriculture = "rowSums(t(national_CH4_agriculture_footprints))", ch4_waste = "rowSums(t(national_CH4_waste_footprints))", - n2o = "rowSums(t(national_N2O_footprints))", + n2o_combustion = "rowSums(t(national_N2O_combustion_footprints))", n2o_agriculture = "rowSums(t(national_N2O_agriculture_footprints))", sf6 = "rowSums(t(national_SF6_footprints))", hfc = "rowSums(t(national_HFC_footprints))", @@ -6699,8 +6699,8 @@ for (i in years_exb_ixi){ select(year, geo, fd_category, - co2, - direct_FD_co2, + co2_combustion, + direct_FD_co2_combustion, co2_noncombustion_cement, direct_FD_co2_noncombustion_cement, co2_noncombustion_lime, @@ -6711,8 +6711,8 @@ for (i in years_exb_ixi){ direct_FD_co2_waste_biogenic, co2_waste_fossil, direct_FD_co2_waste_fossil, - ch4, - direct_FD_ch4, + ch4_combustion, + direct_FD_ch4_combustion, ch4_noncombustion_gas, direct_FD_ch4_noncombustion_gas, ch4_noncombustion_oil, @@ -6733,8 +6733,8 @@ for (i in years_exb_ixi){ direct_FD_ch4_agriculture, ch4_waste, direct_FD_ch4_waste, - n2o, - direct_FD_n2o, + n2o_combustion, + direct_FD_n2o_combustion, n2o_agriculture, direct_FD_n2o_agriculture, sf6, @@ -6795,25 +6795,25 @@ Eurostat_countries_hh_fd_mean_TIV = as.data.frame(Eurostat_countries_hh_fd) %>% weighted_mean_TIV_with_labels = cbind(TIVs,Eurostat_countries_hh_fd_mean_TIV) %>% gather(geo,fd,-country_of_production,-year,-sector,-coicop,-five_sectors, - -TIV_CO2,-TIV_CO2_noncombustion_cement,-TIV_CO2_noncombustion_lime, + -TIV_CO2_combustion,-TIV_CO2_noncombustion_cement,-TIV_CO2_noncombustion_lime, -TIV_CO2_agriculture_peatdecay,-TIV_CO2_waste_biogenic, - -TIV_CO2_waste_fossil,-TIV_CH4, + -TIV_CO2_waste_fossil,-TIV_CH4_combustion, -TIV_CH4_noncombustion_gas,-TIV_CH4_noncombustion_oil, -TIV_CH4_noncombustion_anthracite,-TIV_CH4_noncombustion_bituminouscoal, -TIV_CH4_noncombustion_cokingcoal,-TIV_CH4_noncombustion_lignite, -TIV_CH4_noncombustion_subbituminouscoal,-TIV_CH4_noncombustion_oilrefinery, -TIV_CH4_agriculture,-TIV_CH4_waste, - -TIV_N2O,-TIV_N2O_agriculture,-TIV_SF6,-TIV_HFC,-TIV_PFC, + -TIV_N2O_combustion,-TIV_N2O_agriculture,-TIV_SF6,-TIV_HFC,-TIV_PFC, -TIV_energy) %>% group_by(geo,year,coicop) %>% mutate(fd = as.numeric(fd)) %>% - mutate(TIV_CO2_weighted_average = sum((fd/sum(fd))*TIV_CO2), + mutate(TIV_CO2_combustion_weighted_average = sum((fd/sum(fd))*TIV_CO2_combustion), TIV_CO2_noncombustion_cement_weighted_average = sum((fd/sum(fd))*TIV_CO2_noncombustion_cement), TIV_CO2_noncombustion_lime_weighted_average = sum((fd/sum(fd))*TIV_CO2_noncombustion_lime), TIV_CO2_agriculture_peatdecay_weighted_average = sum((fd/sum(fd))*TIV_CO2_agriculture_peatdecay), TIV_CO2_waste_biogenic_weighted_average = sum((fd/sum(fd))*TIV_CO2_waste_biogenic), TIV_CO2_waste_fossil_weighted_average = sum((fd/sum(fd))*TIV_CO2_waste_fossil), - TIV_CH4_weighted_average = sum((fd/sum(fd))*TIV_CH4), + TIV_CH4_combustion_weighted_average = sum((fd/sum(fd))*TIV_CH4_combustion), TIV_CH4_noncombustion_gas_weighted_average = sum((fd/sum(fd))*TIV_CH4_noncombustion_gas), TIV_CH4_noncombustion_oil_weighted_average = sum((fd/sum(fd))*TIV_CH4_noncombustion_oil), TIV_CH4_noncombustion_anthracite_weighted_average = sum((fd/sum(fd))*TIV_CH4_noncombustion_anthracite), @@ -6824,19 +6824,19 @@ weighted_mean_TIV_with_labels = cbind(TIVs,Eurostat_countries_hh_fd_mean_TIV) %> TIV_CH4_noncombustion_oilrefinery_weighted_average = sum((fd/sum(fd))*TIV_CH4_noncombustion_oilrefinery), TIV_CH4_agriculture_weighted_average = sum((fd/sum(fd))*TIV_CH4_agriculture), TIV_CH4_waste_weighted_average = sum((fd/sum(fd))*TIV_CH4_waste), - TIV_N2O_weighted_average = sum((fd/sum(fd))*TIV_N2O), + TIV_N2O_combustion_weighted_average = sum((fd/sum(fd))*TIV_N2O_combustion), TIV_N2O_agriculture_weighted_average = sum((fd/sum(fd))*TIV_N2O_agriculture), TIV_SF6_weighted_average = sum((fd/sum(fd))*TIV_SF6), TIV_HFC_weighted_average = sum((fd/sum(fd))*TIV_HFC), TIV_PFC_weighted_average = sum((fd/sum(fd))*TIV_PFC), TIV_energy_weighted_average = sum((fd/sum(fd))*TIV_energy)) %>% - select(year,geo,coicop,TIV_CO2_weighted_average, + select(year,geo,coicop,TIV_CO2_combustion_weighted_average, TIV_CO2_noncombustion_cement_weighted_average, TIV_CO2_noncombustion_lime_weighted_average, TIV_CO2_agriculture_peatdecay_weighted_average, TIV_CO2_waste_biogenic_weighted_average, TIV_CO2_waste_fossil_weighted_average, - TIV_CH4_weighted_average, + TIV_CH4_combustion_weighted_average, TIV_CH4_noncombustion_gas_weighted_average, TIV_CH4_noncombustion_oil_weighted_average, TIV_CH4_noncombustion_anthracite_weighted_average, @@ -6847,7 +6847,7 @@ weighted_mean_TIV_with_labels = cbind(TIVs,Eurostat_countries_hh_fd_mean_TIV) %> TIV_CH4_noncombustion_oilrefinery_weighted_average, TIV_CH4_agriculture_weighted_average, TIV_CH4_waste_weighted_average, - TIV_N2O_weighted_average, + TIV_N2O_combustion_weighted_average, TIV_N2O_agriculture_weighted_average, TIV_SF6_weighted_average, TIV_HFC_weighted_average, @@ -6857,13 +6857,13 @@ weighted_mean_TIV_with_labels = cbind(TIVs,Eurostat_countries_hh_fd_mean_TIV) %> weighted_mean_europe_TIV_with_labels = cbind(europe_TIVs, Eurostat_countries_hh_fd_mean_TIV) %>% gather(geo,fd,-country_of_production,-year,-sector,-coicop,-five_sectors, - -TIV_CO2_europe,-TIV_CO2_not_europe, + -TIV_CO2_combustion_europe,-TIV_CO2_combustion_not_europe, -TIV_CO2_noncombustion_cement_europe,-TIV_CO2_noncombustion_cement_not_europe, -TIV_CO2_noncombustion_lime_europe, -TIV_CO2_noncombustion_lime_not_europe, -TIV_CO2_agriculture_peatdecay_europe,-TIV_CO2_agriculture_peatdecay_not_europe, -TIV_CO2_waste_biogenic_europe, -TIV_CO2_waste_biogenic_not_europe, -TIV_CO2_waste_fossil_europe, -TIV_CO2_waste_fossil_not_europe, - -TIV_CH4_europe,-TIV_CH4_not_europe, + -TIV_CH4_combustion_europe,-TIV_CH4_combustion_not_europe, -TIV_CH4_noncombustion_gas_europe, -TIV_CH4_noncombustion_gas_not_europe, -TIV_CH4_noncombustion_oil_europe,-TIV_CH4_noncombustion_oil_not_europe, -TIV_CH4_noncombustion_anthracite_europe,-TIV_CH4_noncombustion_anthracite_not_europe, @@ -6874,20 +6874,20 @@ weighted_mean_europe_TIV_with_labels = cbind(europe_TIVs, Eurostat_countries_hh_ -TIV_CH4_noncombustion_oilrefinery_europe, -TIV_CH4_noncombustion_oilrefinery_not_europe, -TIV_CH4_agriculture_europe, -TIV_CH4_agriculture_not_europe, -TIV_CH4_waste_europe,-TIV_CH4_waste_not_europe, - -TIV_N2O_europe,-TIV_N2O_not_europe, + -TIV_N2O_combustion_europe,-TIV_N2O_combustion_not_europe, -TIV_N2O_agriculture_europe,-TIV_N2O_agriculture_not_europe, -TIV_SF6_europe,-TIV_SF6_not_europe, -TIV_HFC_europe,-TIV_HFC_not_europe,-TIV_PFC_europe,-TIV_PFC_not_europe, -TIV_energy_europe,-TIV_energy_not_europe) %>% group_by(geo,year,coicop) %>% mutate(fd = as.numeric(fd)) %>% - mutate(TIV_CO2_europe_weighted_average = sum((fd/sum(fd))*TIV_CO2_europe), + mutate(TIV_CO2_combustion_europe_weighted_average = sum((fd/sum(fd))*TIV_CO2_combustion_europe), TIV_CO2_noncombustion_cement_europe_weighted_average = sum((fd/sum(fd))*TIV_CO2_noncombustion_cement_europe), TIV_CO2_noncombustion_lime_europe_weighted_average = sum((fd/sum(fd))*TIV_CO2_noncombustion_lime_europe), TIV_CO2_agriculture_peatdecay_europe_weighted_average = sum((fd/sum(fd))*TIV_CO2_agriculture_peatdecay_europe), TIV_CO2_waste_biogenic_europe_weighted_average = sum((fd/sum(fd))*TIV_CO2_waste_biogenic_europe), TIV_CO2_waste_fossil_europe_weighted_average = sum((fd/sum(fd))*TIV_CO2_waste_fossil_europe), - TIV_CH4_europe_weighted_average = sum((fd/sum(fd))*TIV_CH4_europe), + TIV_CH4_combustion_europe_weighted_average = sum((fd/sum(fd))*TIV_CH4_combustion_europe), TIV_CH4_noncombustion_gas_europe_weighted_average = sum((fd/sum(fd))*TIV_CH4_noncombustion_gas_europe), TIV_CH4_noncombustion_oil_europe_weighted_average = sum((fd/sum(fd))*TIV_CH4_noncombustion_oil_europe), TIV_CH4_noncombustion_anthracite_europe_weighted_average = sum((fd/sum(fd))*TIV_CH4_noncombustion_anthracite_europe), @@ -6898,19 +6898,19 @@ weighted_mean_europe_TIV_with_labels = cbind(europe_TIVs, Eurostat_countries_hh_ TIV_CH4_noncombustion_oilrefinery_europe_weighted_average = sum((fd/sum(fd))*TIV_CH4_noncombustion_oilrefinery_europe), TIV_CH4_agriculture_europe_weighted_average = sum((fd/sum(fd))*TIV_CH4_agriculture_europe), TIV_CH4_waste_europe_weighted_average = sum((fd/sum(fd))*TIV_CH4_waste_europe), - TIV_N2O_europe_weighted_average = sum((fd/sum(fd))*TIV_N2O_europe), + TIV_N2O_combustion_europe_weighted_average = sum((fd/sum(fd))*TIV_N2O_combustion_europe), TIV_N2O_agriculture_europe_weighted_average = sum((fd/sum(fd))*TIV_N2O_agriculture_europe), TIV_SF6_europe_weighted_average = sum((fd/sum(fd))*TIV_SF6_europe), TIV_HFC_europe_weighted_average = sum((fd/sum(fd))*TIV_HFC_europe), TIV_PFC_europe_weighted_average = sum((fd/sum(fd))*TIV_PFC_europe), TIV_energy_europe_weighted_average = sum((fd/sum(fd))*TIV_energy_europe)) %>% - select(year,geo,coicop,TIV_CO2_europe_weighted_average, + select(year,geo,coicop,TIV_CO2_combustion_europe_weighted_average, TIV_CO2_noncombustion_cement_europe_weighted_average, TIV_CO2_noncombustion_lime_europe_weighted_average, TIV_CO2_agriculture_peatdecay_europe_weighted_average, TIV_CO2_waste_biogenic_europe_weighted_average, TIV_CO2_waste_fossil_europe_weighted_average, - TIV_CH4_europe_weighted_average, + TIV_CH4_combustion_europe_weighted_average, TIV_CH4_noncombustion_gas_europe_weighted_average, TIV_CH4_noncombustion_oil_europe_weighted_average, TIV_CH4_noncombustion_anthracite_europe_weighted_average, @@ -6921,7 +6921,7 @@ weighted_mean_europe_TIV_with_labels = cbind(europe_TIVs, Eurostat_countries_hh_ TIV_CH4_noncombustion_oilrefinery_europe_weighted_average, TIV_CH4_agriculture_europe_weighted_average, TIV_CH4_waste_europe_weighted_average, - TIV_N2O_europe_weighted_average, + TIV_N2O_combustion_europe_weighted_average, TIV_N2O_agriculture_europe_weighted_average, TIV_SF6_europe_weighted_average, TIV_HFC_europe_weighted_average, @@ -6997,13 +6997,13 @@ Eurostat_countries_hh_fd_long = as.data.frame(Eurostat_countries_hh_fd) %>% weighted_mean_domestic_TIV_with_labels = cbind(domestic_TIVs_Eurostat,Eurostat_countries_hh_fd_long) %>% group_by(geo,year,coicop) %>% mutate(fd = as.numeric(fd)) %>% - mutate(TIV_CO2_domestic_weighted_average = sum((fd/sum(fd))*TIV_CO2_domestic), + mutate(TIV_CO2_combustion_domestic_weighted_average = sum((fd/sum(fd))*TIV_CO2_combustion_domestic), TIV_CO2_noncombustion_cement_domestic_weighted_average = sum((fd/sum(fd))*TIV_CO2_noncombustion_cement_domestic), TIV_CO2_noncombustion_lime_domestic_weighted_average = sum((fd/sum(fd))*TIV_CO2_noncombustion_lime_domestic), TIV_CO2_agriculture_peatdecay_domestic_weighted_average = sum((fd/sum(fd))*TIV_CO2_agriculture_peatdecay_domestic), TIV_CO2_waste_biogenic_domestic_weighted_average = sum((fd/sum(fd))*TIV_CO2_waste_biogenic_domestic), TIV_CO2_waste_fossil_domestic_weighted_average = sum((fd/sum(fd))*TIV_CO2_waste_fossil_domestic), - TIV_CH4_domestic_weighted_average = sum((fd/sum(fd))*TIV_CH4_domestic), + TIV_CH4_combustion_domestic_weighted_average = sum((fd/sum(fd))*TIV_CH4_combustion_domestic), TIV_CH4_noncombustion_gas_domestic_weighted_average = sum((fd/sum(fd))*TIV_CH4_noncombustion_gas_domestic), TIV_CH4_noncombustion_oil_domestic_weighted_average = sum((fd/sum(fd))*TIV_CH4_noncombustion_oil_domestic), TIV_CH4_noncombustion_anthracite_domestic_weighted_average = sum((fd/sum(fd))*TIV_CH4_noncombustion_anthracite_domestic), @@ -7014,19 +7014,19 @@ weighted_mean_domestic_TIV_with_labels = cbind(domestic_TIVs_Eurostat,Eurostat_c TIV_CH4_noncombustion_oilrefinery_domestic_weighted_average = sum((fd/sum(fd))*TIV_CH4_noncombustion_oilrefinery_domestic), TIV_CH4_agriculture_domestic_weighted_average = sum((fd/sum(fd))*TIV_CH4_agriculture_domestic), TIV_CH4_waste_domestic_weighted_average = sum((fd/sum(fd))*TIV_CH4_waste_domestic), - TIV_N2O_domestic_weighted_average = sum((fd/sum(fd))*TIV_N2O_domestic), + TIV_N2O_combustion_domestic_weighted_average = sum((fd/sum(fd))*TIV_N2O_combustion_domestic), TIV_N2O_agriculture_domestic_weighted_average = sum((fd/sum(fd))*TIV_N2O_agriculture_domestic), TIV_SF6_domestic_weighted_average = sum((fd/sum(fd))*TIV_SF6_domestic), TIV_HFC_domestic_weighted_average = sum((fd/sum(fd))*TIV_HFC_domestic), TIV_PFC_domestic_weighted_average = sum((fd/sum(fd))*TIV_PFC_domestic), TIV_energy_domestic_weighted_average = sum((fd/sum(fd))*TIV_energy_domestic)) %>% - select(year,geo,coicop,TIV_CO2_domestic_weighted_average, + select(year,geo,coicop,TIV_CO2_combustion_domestic_weighted_average, TIV_CO2_noncombustion_cement_domestic_weighted_average, TIV_CO2_noncombustion_lime_domestic_weighted_average, TIV_CO2_agriculture_peatdecay_domestic_weighted_average, TIV_CO2_waste_biogenic_domestic_weighted_average, TIV_CO2_waste_fossil_domestic_weighted_average, - TIV_CH4_domestic_weighted_average, + TIV_CH4_combustion_domestic_weighted_average, TIV_CH4_noncombustion_gas_domestic_weighted_average, TIV_CH4_noncombustion_oil_domestic_weighted_average, TIV_CH4_noncombustion_anthracite_domestic_weighted_average, @@ -7037,7 +7037,7 @@ weighted_mean_domestic_TIV_with_labels = cbind(domestic_TIVs_Eurostat,Eurostat_c TIV_CH4_noncombustion_oilrefinery_domestic_weighted_average, TIV_CH4_agriculture_domestic_weighted_average, TIV_CH4_waste_domestic_weighted_average, - TIV_N2O_domestic_weighted_average, + TIV_N2O_combustion_domestic_weighted_average, TIV_N2O_agriculture_domestic_weighted_average, TIV_SF6_domestic_weighted_average, TIV_HFC_domestic_weighted_average, @@ -7054,22 +7054,22 @@ ok = join_ala %>% left_join(weighted_mean_TIV_with_labels, by = c("geo","year","coicop")) %>% left_join(weighted_mean_europe_TIV_with_labels, by = c("geo","year","coicop")) %>% left_join(weighted_mean_domestic_TIV_with_labels, by = c("geo", "year", "coicop")) %>% - mutate(co2_kg = fd_me*(TIV_CO2_weighted_average + TIV_CO2_noncombustion_cement_weighted_average + + mutate(co2_kg = fd_me*(TIV_CO2_combustion_weighted_average + TIV_CO2_noncombustion_cement_weighted_average + TIV_CO2_noncombustion_lime_weighted_average + TIV_CO2_agriculture_peatdecay_weighted_average + TIV_CO2_waste_biogenic_weighted_average + TIV_CO2_waste_fossil_weighted_average), - co2_domestic_kg = fd_me*(TIV_CO2_domestic_weighted_average + TIV_CO2_noncombustion_cement_domestic_weighted_average + + co2_domestic_kg = fd_me*(TIV_CO2_combustion_domestic_weighted_average + TIV_CO2_noncombustion_cement_domestic_weighted_average + TIV_CO2_noncombustion_lime_domestic_weighted_average + TIV_CO2_agriculture_peatdecay_domestic_weighted_average + TIV_CO2_waste_biogenic_domestic_weighted_average + TIV_CO2_waste_fossil_domestic_weighted_average), - co2_europe_kg = fd_me*((TIV_CO2_europe_weighted_average + TIV_CO2_noncombustion_cement_europe_weighted_average + + co2_europe_kg = fd_me*((TIV_CO2_combustion_europe_weighted_average + TIV_CO2_noncombustion_cement_europe_weighted_average + TIV_CO2_noncombustion_lime_europe_weighted_average + TIV_CO2_agriculture_peatdecay_europe_weighted_average + - TIV_CO2_waste_biogenic_europe_weighted_average + TIV_CO2_waste_fossil_europe_weighted_average) - (TIV_CO2_domestic_weighted_average + TIV_CO2_noncombustion_cement_domestic_weighted_average + + TIV_CO2_waste_biogenic_europe_weighted_average + TIV_CO2_waste_fossil_europe_weighted_average) - (TIV_CO2_combustion_domestic_weighted_average + TIV_CO2_noncombustion_cement_domestic_weighted_average + TIV_CO2_noncombustion_lime_domestic_weighted_average + TIV_CO2_agriculture_peatdecay_domestic_weighted_average + TIV_CO2_waste_biogenic_domestic_weighted_average + TIV_CO2_waste_fossil_domestic_weighted_average)), - co2eq_kg = fd_me*(TIV_CO2_weighted_average + + co2eq_kg = fd_me*(TIV_CO2_combustion_weighted_average + TIV_CO2_noncombustion_cement_weighted_average + TIV_CO2_noncombustion_lime_weighted_average + TIV_CO2_agriculture_peatdecay_weighted_average + TIV_CO2_waste_biogenic_weighted_average + TIV_CO2_waste_fossil_weighted_average + - TIV_CH4_weighted_average + + TIV_CH4_combustion_weighted_average + TIV_CH4_noncombustion_gas_weighted_average + TIV_CH4_noncombustion_oil_weighted_average + TIV_CH4_noncombustion_anthracite_weighted_average + @@ -7080,16 +7080,16 @@ ok = join_ala %>% TIV_CH4_noncombustion_oilrefinery_weighted_average + TIV_CH4_agriculture_weighted_average + TIV_CH4_waste_weighted_average + - TIV_N2O_weighted_average + + TIV_N2O_combustion_weighted_average + TIV_N2O_agriculture_weighted_average + TIV_SF6_weighted_average + TIV_HFC_weighted_average + TIV_PFC_weighted_average), - co2eq_domestic_kg = fd_me*(TIV_CO2_domestic_weighted_average + + co2eq_domestic_kg = fd_me*(TIV_CO2_combustion_domestic_weighted_average + TIV_CO2_noncombustion_cement_domestic_weighted_average + TIV_CO2_noncombustion_lime_domestic_weighted_average + TIV_CO2_agriculture_peatdecay_domestic_weighted_average + TIV_CO2_waste_biogenic_domestic_weighted_average + TIV_CO2_waste_fossil_domestic_weighted_average + - TIV_CH4_domestic_weighted_average + + TIV_CH4_combustion_domestic_weighted_average + TIV_CH4_noncombustion_gas_domestic_weighted_average + TIV_CH4_noncombustion_oil_domestic_weighted_average + TIV_CH4_noncombustion_anthracite_domestic_weighted_average + @@ -7100,16 +7100,16 @@ ok = join_ala %>% TIV_CH4_noncombustion_oilrefinery_domestic_weighted_average + TIV_CH4_agriculture_domestic_weighted_average + TIV_CH4_waste_domestic_weighted_average + - TIV_N2O_domestic_weighted_average + + TIV_N2O_combustion_domestic_weighted_average + TIV_N2O_agriculture_domestic_weighted_average + TIV_SF6_domestic_weighted_average + TIV_HFC_domestic_weighted_average + TIV_PFC_domestic_weighted_average), - co2eq_europe_kg = fd_me*((TIV_CO2_europe_weighted_average + + co2eq_europe_kg = fd_me*((TIV_CO2_combustion_europe_weighted_average + TIV_CO2_noncombustion_cement_europe_weighted_average + TIV_CO2_noncombustion_lime_europe_weighted_average + TIV_CO2_agriculture_peatdecay_europe_weighted_average + TIV_CO2_waste_biogenic_europe_weighted_average + TIV_CO2_waste_fossil_europe_weighted_average + - TIV_CH4_europe_weighted_average + + TIV_CH4_combustion_europe_weighted_average + TIV_CH4_noncombustion_gas_europe_weighted_average + TIV_CH4_noncombustion_oil_europe_weighted_average + TIV_CH4_noncombustion_anthracite_europe_weighted_average + @@ -7120,16 +7120,16 @@ ok = join_ala %>% TIV_CH4_noncombustion_oilrefinery_europe_weighted_average + TIV_CH4_agriculture_europe_weighted_average + TIV_CH4_waste_europe_weighted_average + - TIV_N2O_europe_weighted_average + + TIV_N2O_combustion_europe_weighted_average + TIV_N2O_agriculture_europe_weighted_average + TIV_SF6_europe_weighted_average + TIV_HFC_europe_weighted_average + TIV_PFC_europe_weighted_average) - - (TIV_CO2_domestic_weighted_average + + (TIV_CO2_combustion_domestic_weighted_average + TIV_CO2_noncombustion_cement_domestic_weighted_average + TIV_CO2_noncombustion_lime_domestic_weighted_average + TIV_CO2_agriculture_peatdecay_domestic_weighted_average + TIV_CO2_waste_biogenic_domestic_weighted_average + TIV_CO2_waste_fossil_domestic_weighted_average + - TIV_CH4_domestic_weighted_average + + TIV_CH4_combustion_domestic_weighted_average + TIV_CH4_noncombustion_gas_domestic_weighted_average + TIV_CH4_noncombustion_oil_domestic_weighted_average + TIV_CH4_noncombustion_anthracite_domestic_weighted_average + @@ -7140,7 +7140,7 @@ ok = join_ala %>% TIV_CH4_noncombustion_oilrefinery_domestic_weighted_average + TIV_CH4_agriculture_domestic_weighted_average + TIV_CH4_waste_domestic_weighted_average + - TIV_N2O_domestic_weighted_average + + TIV_N2O_combustion_domestic_weighted_average + TIV_N2O_agriculture_domestic_weighted_average + TIV_SF6_domestic_weighted_average + TIV_HFC_domestic_weighted_average + @@ -7273,13 +7273,13 @@ direct_FD_fp_long = national_fp %>% "PT" , "TR" , "SK" , "SI" , "SE" , "RO" , "NO")) %>% - select(year,geo,fd_category,direct_FD_co2, + select(year,geo,fd_category,direct_FD_co2_combustion, direct_FD_co2_noncombustion_cement, direct_FD_co2_noncombustion_lime, direct_FD_co2_agriculture_peatdecay, direct_FD_co2_waste_biogenic, direct_FD_co2_waste_fossil, - direct_FD_ch4, + direct_FD_ch4_combustion, direct_FD_ch4_noncombustion_gas, direct_FD_ch4_noncombustion_oil, direct_FD_ch4_noncombustion_anthracite, @@ -7290,7 +7290,7 @@ direct_FD_fp_long = national_fp %>% direct_FD_ch4_noncombustion_oilrefinery, direct_FD_ch4_agriculture, direct_FD_ch4_waste, - direct_FD_n2o, + direct_FD_n2o_combustion, direct_FD_n2o_agriculture, direct_FD_sf6, direct_FD_hfc, @@ -7309,13 +7309,13 @@ direct_FD_fp_long_disagg = cbind(sector,direct_FD_fp_long) %>% left_join(env_ac_ainah_r2_ch4, by = c("geo","sector")) %>% left_join(env_ac_ainah_r2_n2o, by = c("geo","sector")) %>% left_join(env_ac_pefasu, by = c("geo","sector")) %>% - mutate(direct_FD_co2 = (direct_FD_co2 + + mutate(direct_FD_co2 = (direct_FD_co2_combustion + direct_FD_co2_noncombustion_cement + direct_FD_co2_noncombustion_lime + direct_FD_co2_agriculture_peatdecay + direct_FD_co2_waste_biogenic + direct_FD_co2_waste_fossil)*share_of_total_co2, - direct_FD_ch4 = (direct_FD_ch4 + + direct_FD_ch4 = (direct_FD_ch4_combustion + direct_FD_ch4_noncombustion_gas + direct_FD_ch4_noncombustion_oil + direct_FD_ch4_noncombustion_anthracite + @@ -7326,7 +7326,7 @@ direct_FD_fp_long_disagg = cbind(sector,direct_FD_fp_long) %>% direct_FD_ch4_noncombustion_oilrefinery + direct_FD_ch4_agriculture + direct_FD_ch4_waste)*share_of_total_ch4, - direct_FD_n2o = (direct_FD_n2o + + direct_FD_n2o = (direct_FD_n2o_combustion + direct_FD_n2o_agriculture)*share_of_total_n2o, direct_FD_energy = direct_FD_energy*share_of_total_energy) %>% left_join(shares, by = c("year","geo","coicop")) %>%