From db2b2cb3f2f511780b6d1d4a5f3fd7e915c268b5 Mon Sep 17 00:00:00 2001 From: Falk Benke Date: Mon, 29 Jul 2024 15:45:12 +0200 Subject: [PATCH] remove markdowns no longer used --- .../cs2_02_energy_demand_UE.Rmd | 62 -------- ...ervices.Rmd => cs2_02_energy_services.Rmd} | 0 ...ensity.Rmd => cs2_03_energy_intensity.Rmd} | 0 ...d_sales.Rmd => cs2_04_stock_and_sales.Rmd} | 0 ..._06_emissions.Rmd => cs2_05_emissions.Rmd} | 0 .../cs2_07_endogenous_cost_analytics.Rmd | 19 --- .../cs2_08_nav_scenario_evaluation.Rmd | 147 ------------------ 7 files changed, 228 deletions(-) delete mode 100644 inst/compareScenarios/cs2_02_energy_demand_UE.Rmd rename inst/compareScenarios/{cs2_03_energy_services.Rmd => cs2_02_energy_services.Rmd} (100%) rename inst/compareScenarios/{cs2_04_energy_intensity.Rmd => cs2_03_energy_intensity.Rmd} (100%) rename inst/compareScenarios/{cs2_05_stock_and_sales.Rmd => cs2_04_stock_and_sales.Rmd} (100%) rename inst/compareScenarios/{cs2_06_emissions.Rmd => cs2_05_emissions.Rmd} (100%) delete mode 100644 inst/compareScenarios/cs2_07_endogenous_cost_analytics.Rmd delete mode 100644 inst/compareScenarios/cs2_08_nav_scenario_evaluation.Rmd diff --git a/inst/compareScenarios/cs2_02_energy_demand_UE.Rmd b/inst/compareScenarios/cs2_02_energy_demand_UE.Rmd deleted file mode 100644 index 5f8a171..0000000 --- a/inst/compareScenarios/cs2_02_energy_demand_UE.Rmd +++ /dev/null @@ -1,62 +0,0 @@ -# Useful Energy Demand - - -## Useful Energy by carrier - -### Total -```{r} -items <- c( - "UE|Transport|Electricity", - "UE|Transport|Hydrogen", - "UE|Transport|Liquids" - ) - -walk(items, showLinePlots, data = data) -``` - -### Road -```{r} -items <- c( - "UE|Transport|Road|Electricity", - "UE|Transport|Road|Liquids", - "UE|Transport|Road|Hydrogen", - ) - -walk(items, showLinePlots, data = data) -``` - -### Passenger -```{r} -items <- c( - "UE|Transport|Pass with bunkers|Electricity", - "UE|Transport|Pass with bunkers|Hydrogen", - "UE|Transport|Pass with bunkers|Liquids" - ) - -walk(items, showLinePlots, data = data) -``` - -### Passenger -```{r} -items <- c( - "UE|Transport|Pass|Electricity", - "UE|Transport|Pass|Hydrogen", - "UE|Transport|Pass|Liquids" - ) -walk(items, showLinePlots, data = data) -``` - - -## Useful Energy by transport modes - -### Passenger -```{r} -items <- c( - "UE|Transport|Pass|Rail|HSR", - "UE|Transport|Pass|Rail|non-HSR", - "UE|Transport|Pass|Road|Bus", - "UE|Transport|Pass|Road|LDV|Four Wheelers", - "UE|Transport|Pass|Road|LDV|Two Wheelers" - ) -walk(items, showLinePlots, data = data) -``` diff --git a/inst/compareScenarios/cs2_03_energy_services.Rmd b/inst/compareScenarios/cs2_02_energy_services.Rmd similarity index 100% rename from inst/compareScenarios/cs2_03_energy_services.Rmd rename to inst/compareScenarios/cs2_02_energy_services.Rmd diff --git a/inst/compareScenarios/cs2_04_energy_intensity.Rmd b/inst/compareScenarios/cs2_03_energy_intensity.Rmd similarity index 100% rename from inst/compareScenarios/cs2_04_energy_intensity.Rmd rename to inst/compareScenarios/cs2_03_energy_intensity.Rmd diff --git a/inst/compareScenarios/cs2_05_stock_and_sales.Rmd b/inst/compareScenarios/cs2_04_stock_and_sales.Rmd similarity index 100% rename from inst/compareScenarios/cs2_05_stock_and_sales.Rmd rename to inst/compareScenarios/cs2_04_stock_and_sales.Rmd diff --git a/inst/compareScenarios/cs2_06_emissions.Rmd b/inst/compareScenarios/cs2_05_emissions.Rmd similarity index 100% rename from inst/compareScenarios/cs2_06_emissions.Rmd rename to inst/compareScenarios/cs2_05_emissions.Rmd diff --git a/inst/compareScenarios/cs2_07_endogenous_cost_analytics.Rmd b/inst/compareScenarios/cs2_07_endogenous_cost_analytics.Rmd deleted file mode 100644 index e9bd720..0000000 --- a/inst/compareScenarios/cs2_07_endogenous_cost_analytics.Rmd +++ /dev/null @@ -1,19 +0,0 @@ -# Endogenous Cost Analytics - -```{r} -data <- as.data.table(data) -plotData <- data[grepl("(Policy mask.*|rawEndogenousCost.*|updatedEndogenousCost.*"), variable] - -# Convert year to a factor for better plotting -plotData$period <- as.factor(plotData$period) - -# Create the line plot with facets -ggplot(plotData, aes(x = period, y = value, group = variable, color = variable)) + - geom_line() + - facet_grid(region ~ vehicleType + technology, scales = "free_y") + - labs(title = "Endogenous Cost", - x = "period", - y = "value", - color = "variable") + - theme_minimal() -``` diff --git a/inst/compareScenarios/cs2_08_nav_scenario_evaluation.Rmd b/inst/compareScenarios/cs2_08_nav_scenario_evaluation.Rmd deleted file mode 100644 index 28e6c90..0000000 --- a/inst/compareScenarios/cs2_08_nav_scenario_evaluation.Rmd +++ /dev/null @@ -1,147 +0,0 @@ -# Evaluation Sheet NAVIGATE scenarios -```{r setting} -data <- as.data.table(data) -Baseline <- "Mix1 SSP2" -``` - -```{r Calculate ES reduction rate for Passenger Cars compared to Baseline for all scenarios} -targetyear <- 2050 -ES_data_base <- data[scenario == Baseline & variable == "ES|Transport|Pass|Road|LDV|Four Wheelers" & period == targetyear][, scenario := NULL] -setnames(ES_data_base, "value", "ES_base") -red_ES_pass <- merge(ES_data_base, data[!scenario == Baseline & variable == "ES|Transport|Pass|Road|LDV|Four Wheelers" & period == targetyear], all = TRUE) -red_ES_pass[, reduction_rate := round((value/ES_base)*100-100,2)] -red_ES_pass <- red_ES_pass[, c("scenario", "region", "reduction_rate")] -``` - -```{r Plot ES reduction rate for Passenger Cars compared to Baseline for all scenarios} -ggplot(red_ES_pass, aes(x = scenario, y = reduction_rate)) + - geom_bar(stat="identity") + - geom_label(aes(label = reduction_rate), vjust = 0.5, colour = "black") + - labs(x = "Scenario", y = paste0("Change [%]"), title = paste0("ES reduction rate for Passenger Cars compared to Baseline for all scenarios")) + -``` - -```{r Calculate ES reduction rate for Freight compared to Baseline for all scenarios} -targetyear <- 2050 -ES_data_base <- data[scenario == Baseline & grepl("ES\\|Transport\\|Freight\\|(Road|Rail)$", variable) & period == targetyear] -ES_data_base <- ES_data_base[, .(ES_Freight_land_base = sum(value)), by = "region"] -ES_data <- data[!scenario %in% c(Baseline, "historical") & grepl("ES\\|Transport\\|Freight\\|(Road|Rail)$", variable) & period == targetyear] -ES_data <- ES_data[, .(ES_Freight_land = sum(value)), by = c("scenario", "region")] -ES_data <- merge(ES_data_base, ES_data, all = TRUE) -ES_data[, reduction_rate := round((ES_Freight_land/ES_Freight_land_base)*100-100)] -ES_data <- ES_data[, c("scenario", "region", "reduction_rate")] -``` - -```{r Plot ES reduction rate for Freight compared to Baseline for all scenarios} -ggplot(ES_data, aes(x = scenario, y = reduction_rate)) + - geom_bar(stat="identity") + - geom_label(aes(label = reduction_rate), vjust = 0.5, colour = "black") + - labs(x = "Scenario", y = paste0("Change [%]"), title = paste0("Cange in ES for land-based freight transport compared to Baseline for all scenarios")) + - facet_wrap(~region, nrow = 5,scales = "free") -``` - -```{r Calculate ES shares for all scenarios} -targetyear <- 2050 -Pass_land <- c("ES|Transport|Pass|Rail", "ES|Transport|Pass|Road|LDV", "ES|Transport|Pass|Road|Bus", "ES|Transport|Pass|Non-motorized") -Pass_land_public <- c("ES|Transport|Pass|Road|Bus", "ES|Transport|Pass|Rail") -ES_data_land <- data[!scenario %in% c(Baseline, "historical") & variable %in% Pass_land & period == targetyear] -ES_data_land <- ES_data_land[, .(ES_Pass_land = sum(value)), by = c("region", "scenario")] -ES_data_public <- data[!scenario %in% c(Baseline, "historical") & variable %in% Pass_land_public & period == targetyear] -ES_data_public <- ES_data_public[, .(ES_Pass_public = sum(value)), by = c("region", "scenario")] -ES_data_nonmot <- data[!scenario %in% c(Baseline, "historical") & variable == "ES|Transport|Pass|Non-motorized" & period == targetyear] -ES_data_nonmot <- ES_data_nonmot[, .(ES_Pass_nonmot = sum(value)), by = c("region", "scenario")] -ES_data <- merge(ES_data_land, ES_data_public, by = c("region", "scenario")) -ES_data <- merge(ES_data, ES_data_nonmot, by = c("region", "scenario")) -ES_data[, share_public := round(ES_Pass_public/ES_Pass_land*100,2)][, ES_Pass_public := NULL] -ES_data[, share_nonmot := round(ES_Pass_nonmot/ES_Pass_land*100,2)][, ES_Pass_land := NULL][, ES_Pass_nonmot := NULL] -``` - -```{r Plot ES shares nonmot for all scenarios} -ggplot(ES_data, aes(x = scenario, y = share_nonmot)) + - geom_bar(stat="identity") + - geom_label(aes(label = share_nonmot), vjust = 0.5, colour = "black") + - labs(x = "Scenario", y = paste0("Share nonmot [%]"), title = paste0("Share of active modes in Passenger land-based transport for all scenarios")) + - facet_wrap(~region, nrow = 5, scales = "free") -``` - -```{r Plot ES shares public for all scenarios} -ggplot(ES_data, aes(x = scenario, y = share_public)) + - geom_bar(stat="identity") + - geom_label(aes(label = share_public), vjust = 0.5, colour = "black") + - labs(x = "Scenario", y = paste0("Share public transport [%]"), title = paste0("Share of public modes in Passenger land-based transport for all scenarios")) + - facet_wrap(~region, nrow = 5, scales = "free") -``` - -```{r Calculate ES reduction rate for Aviation compared to Baseline for all scenarios} -targetyear <- 2050 -ES_data_base_dom <- data[scenario == Baseline & variable == "ES|Transport|Pass|Domestic Aviation" & period == targetyear] -ES_data_base_int <- data[scenario == Baseline & variable == "ES|Transport|Bunkers|Pass|International Aviation" & period == targetyear] -setnames(ES_data_base_dom, "value", "ES_dom_base") -setnames(ES_data_base_int, "value", "ES_int_base") -ES_data_base <- merge(ES_data_base_dom[, c("region", "ES_dom_base")], ES_data_base_int[, c("region", "ES_int_base")]) - -ES_data_dom <- data[!scenario %in% c(Baseline, "historical") & variable == "ES|Transport|Pass|Domestic Aviation" & period == targetyear] -ES_data_int <- data[!scenario %in% c(Baseline, "historical") & variable == "ES|Transport|Bunkers|Pass|International Aviation" & period == targetyear] -setnames(ES_data_dom, "value", "ES_dom") -setnames(ES_data_int, "value", "ES_int") -ES_data <- merge(ES_data_dom[, c("region", "ES_dom", "scenario")], ES_data_int[, c("region", "ES_int", "scenario")]) - -ES_data <- merge(ES_data_base, ES_data, all = TRUE) -ES_data[, reduction_rate_int := round((ES_int/ES_int_base)*100-100)] -ES_data[, reduction_rate_dom := round((ES_dom/ES_dom_base)*100-100)] -ES_data <- ES_data[, c("scenario", "region", "reduction_rate_int", "reduction_rate_dom")] -``` - -```{r Plot ES reduction rate for Aviation dom compared to Baseline for all scenarios} -ggplot(ES_data, aes(x = scenario, y = reduction_rate_dom)) + - geom_bar(stat="identity") + - geom_label(aes(label = reduction_rate_dom), vjust = 0.5, colour = "black") + - labs(x = "Scenario", y = paste0("Change [%]"), title = paste0("Cange in ES for domestic passenger avitaion compared to Baseline for all scenarios")) + - facet_wrap(~region, nrow = 5, scales = "free") -``` - -```{r Plot ES reduction rate for Aviation int compared to Baseline for all scenarios} -ggplot(ES_data, aes(x = scenario, y = reduction_rate_int)) + - geom_bar(stat="identity") + - geom_label(aes(label = reduction_rate_int), vjust = 0.5, colour = "black") + - labs(x = "Scenario", y = paste0("Change [%]"), title = paste0("Cange in ES for international passenger avitaion compared to Baseline for all scenarios")) + - facet_wrap(~region, nrow = 5, scales = "free") -``` - - - -```{r Calculate ES reduction rate for Freight shipping compared to Baseline for all scenarios} -targetyear <- 2050 -ES_data_base <- data[scenario == Baseline & grepl("ES\\|Transport\\|Freight\\|(International Shipping|Domestic Shipping)$", variable) & period == targetyear] -ES_data_base <- ES_data_base[, .(ES_Freight_shipping_base = sum(value)), by = "region"] -ES_data <- data[!scenario %in% c(Baseline, "historical") & grepl("ES\\|Transport\\|Freight\\|(International Shipping|Domestic Shipping)$", variable) & period == targetyear] -ES_data <- ES_data[, .(ES_Freight_shipping = sum(value)), by = c("scenario", "region")] -ES_data <- merge(ES_data_base, ES_data, all = TRUE) -ES_data[, reduction_rate := round((ES_Freight_shipping/ES_Freight_shipping_base)*100-100)] -ES_data <- ES_data[, c("scenario", "region", "reduction_rate")] -``` - -```{r Plot ES reduction rate for Freight shipping compared to Baseline for all scenarios} -ggplot(ES_data, aes(x = scenario, y = reduction_rate)) + - geom_bar(stat="identity") + - geom_label(aes(label = reduction_rate), vjust = 0.5, colour = "black") + - labs(x = "Scenario", y = paste0("Change [%]"), title = paste0("Cange in ES for freight shipping compared to Baseline for all scenarios")) + - facet_wrap(~region, nrow = 5, scales = "free") -``` - -```{r Calculate Share of H2 in aviation (international+domestic) for all scenarios} -targetyear <- 2070 -FE_data_h2 <- data[!scenario %in% c(Baseline, "historical") & grepl("FE\\|Transport\\|Pass\\|Aviation\\|Domestic\\|Hydrogen$", variable) & period == targetyear] -setnames(FE_data_h2, "value", "FE_h2") -FE_data <- data[!scenario %in% c(Baseline, "historical") & grepl("FE\\|Transport\\|Pass\\|Aviation$", variable) & period == targetyear] -FE_data <- merge(FE_data_h2[, c("region", "scenario", "FE_h2")], FE_data[, c("region", "scenario", "value")]) -FE_data[, shareh2 := round((FE_h2/value)*100)] -FE_data <- FE_data[, c("scenario", "region", "shareh2")] -``` - -```{r Plot Share of H2 in aviation (international+domestic) for all scenarios} -ggplot(FE_data, aes(x = scenario, y = shareh2)) + - geom_bar(stat="identity") + - geom_label(aes(label = shareh2), vjust = 0.5, colour = "black") + - labs(x = "Scenario", y = paste0("Change [%]"), title = paste0("Share of H2 in aviation (international+domestic) for all scenarios")) + - facet_wrap(~region, nrow = 5, scales = "free") -```