Skip to content
Snippets Groups Projects
Commit f0453b2b authored by Marianna Rottoli's avatar Marianna Rottoli
Browse files

EDGE reporting scripts minor fixes.

parent ce6ba5a4
No related branches found
No related tags found
1 merge request!159Pullreq1
......@@ -48,6 +48,7 @@ cols <- c("NG" = "#d11141",
"Trucks" = "#ff6a6a",
"International Shipping" = "#cd2626",
"Domestic Shipping" = "#ff4040",
"Truck" = "#ff7f50";
"Trucks (<3.5t)" = "#ff7f50",
"Trucks (3.5t-16)" = "#8b0000",
"Trucks (>16)" = "#fa8072",
......@@ -84,7 +85,7 @@ cols <- c("NG" = "#d11141",
"Cons. + Synfuels" = "orchid",
"Ctax_Conservative" = "#d11141")
legend_ord_modes <- c("Freight Rail", "Trucks (<3.5t)", "Trucks (3.5t-16)", "Trucks (>16)", "International Shipping","Domestic Shipping", "Trucks",
legend_ord_modes <- c("Freight Rail", "Truck", "Trucks (<3.5t)", "Trucks (3.5t-16)", "Trucks (>16)", "International Shipping","Domestic Shipping", "Trucks",
"Motorbikes", "Small Cars", "Large Cars", "Van",
"International Aviation", "Domestic Aviation","Bus", "Passenger Rail",
"Freight", "LDV", "Pass non LDV", "Freight (Inland)", "Pass non LDV (Domestic)", "Non motorized")
......@@ -116,7 +117,7 @@ vintcomparisonpf = function(dt){
fill = technology, width=.75), alpha = 0.5, position="stack", stat = "identity", width = 0.5)+
geom_bar(data = dt,
aes(x=scenario, y=value, group=interaction(variable, technology),
fill = technology, alpha = factor(alphaval), width=.75), position="stack", stat = "identity", width = 0.5, color = "black")+
fill = technology, alpha = factor(alphaval), width=.75), position="stack", stat = "identity", width = 0.5, color = "black", size=0.05)+
guides(fill = guide_legend(reverse=TRUE))+
theme_minimal()+
facet_grid(year~region)+
......@@ -215,4 +216,4 @@ EJmodeFUn = function(dt){
EJmodeFUn(EJmode_all)
```
\ No newline at end of file
```
......@@ -92,12 +92,12 @@ plotVint = function(vintcomp, newcomp, sharesVS1){
p = ggplot()+
geom_bar(data = allfleet[year %in% c(2015,2030,2050)],
geom_bar(data = allfleet[year %in% c(2015, 2030, 2050, 2100)],
aes(x=as.character(year),y=value, group=interaction(variable, technology),
fill = technology), alpha = 0.5, position="stack", stat = "identity", width = 0.5)+
geom_bar(data = allfleet[year %in% c(2015,2030,2050)],
geom_bar(data = allfleet[year %in% c(2015, 2030, 2050, 2100)],
aes(x=as.character(year),y=value, group=interaction(variable, technology),
fill = technology, alpha = factor(alphaval)), position="stack", stat = "identity", width = 0.5, color = "black")+
fill = technology, alpha = factor(alphaval)), position="stack", stat = "identity", width = 0.5, color = "black", size = 0.05)+
guides(fill = guide_legend(reverse=TRUE))+
theme_minimal()+
facet_wrap(~region, nrow = 4)+
......@@ -105,7 +105,7 @@ plotVint = function(vintcomp, newcomp, sharesVS1){
axis.text = element_text(size=7),
title = element_text(size=8),
legend.text = element_text(size=8))+
scale_x_discrete(breaks = c(2015,2030,2050))+
scale_x_discrete(breaks = c(2015, 2030, 2050, 2100))+
scale_alpha_discrete(breaks = c(1,0), name = "Status", labels = c("Vintages","New additions")) +
guides(linetype=FALSE,
fill=guide_legend(reverse=FALSE, title="Transport mode"))+
......@@ -188,7 +188,6 @@ intcompplotf = function(EF_shares, FV_shares, VS1_shares){
p = ggplot()+
geom_bar(data = shares_LDV[year<=2100 & year>=2025], aes(x=year,y=shareIS1, group = technology, fill = technology), alpha = 0.5, position = position_fill(), stat = "identity")+
geom_bar(data = shares_LDV[year<=2100 & year>=2025], aes(x=year,y=shareIS1, group = technology, fill = technology, alpha = type), position = position_fill(), stat = "identity")+
facet_wrap("technology")+
theme_minimal()+
expand_limits(y = c(0,1))+
scale_fill_manual("technology", values = cols)+
......@@ -498,4 +497,4 @@ CO2km_intensity_newsalesplotf = function(annual_sales, mj_km_data, sharesVS1, sh
shares_source_liquids = miffile[variable %in% c("FE|Transport|Liquids|Biomass", "FE|Transport|Liquids|Coal", "FE|Transport|Liquids|Oil"),]
CO2km_intensity_newsalesplotf(annual_sales, mj_km_data, sharesVS1 = shares$VS1_shares, shares_source_liquids)
```
\ No newline at end of file
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment