Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
remind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jerome Hilaire
remind
Commits
c06e0de1
Commit
c06e0de1
authored
4 years ago
by
Marianna Rottoli
Browse files
Options
Downloads
Patches
Plain Diff
Reporting minor improvements.
parent
779ea950
No related branches found
No related tags found
1 merge request
!194
Updates to EDGE-Transport
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/output/comparison/notebook_templates/EDGETransportComparison.Rmd
+22
-11
22 additions, 11 deletions
...comparison/notebook_templates/EDGETransportComparison.Rmd
with
22 additions
and
11 deletions
scripts/output/comparison/notebook_templates/EDGETransportComparison.Rmd
+
22
−
11
View file @
c06e0de1
...
@@ -119,7 +119,7 @@ legend_ord_modes <- c("Freight Rail", "Truck", "Shipping", "International Shippi
...
@@ -119,7 +119,7 @@ legend_ord_modes <- c("Freight Rail", "Truck", "Shipping", "International Shippi
legend_ord_fuels <- c("BEV", "Electricity", "Hybrid Electric", "FCEV", "Hydrogen", "Hybrid Liquids", "Liquids", "Oil", "Biodiesel", "Synfuel", "NG")
legend_ord_fuels <- c("BEV", "Electricity", "Hybrid Electric", "FCEV", "Hydrogen", "Hybrid Liquids", "Liquids", "Oil", "Biodiesel", "Synfuel", "NG")
legend_ord_costs <- c("Inconvenience cost", "Risk", "Charging", "Model availability", "Range anxiety", "Refuel availability",
"Fuel",
"Policy induced inconvenience", "Purchase", "Operating and maintenance")
legend_ord_costs <- c("Inconvenience cost", "Risk", "Charging", "Model availability", "Range anxiety", "Refuel availability", "Policy induced inconvenience",
"Fuel",
"Purchase", "Operating and maintenance")
legend_ord_emissions <- c("Emi|CO2|Industry|Gross", "Emi|CO2|Buildings|Direct", "Emi|CO2|Transport|Demand", "Emi|CO2|Energy|Supply|Gross", "Emi|CO2|Land-Use Change","Emi|CO2|CDR|BECCS")
legend_ord_emissions <- c("Emi|CO2|Industry|Gross", "Emi|CO2|Buildings|Direct", "Emi|CO2|Transport|Demand", "Emi|CO2|Energy|Supply|Gross", "Emi|CO2|Land-Use Change","Emi|CO2|CDR|BECCS")
...
@@ -557,7 +557,7 @@ facet_grid(scenario~technology)+
...
@@ -557,7 +557,7 @@ facet_grid(scenario~technology)+
title = element_text(size=14),
title = element_text(size=14),
axis.line = element_line(size = 0.5, colour = "grey"),
axis.line = element_line(size = 0.5, colour = "grey"),
legend.text = element_text(size=14),
legend.text = element_text(size=14),
strip.text = element_text(size=1
4
),
strip.text = element_text(size=1
2
),
strip.background = element_rect(color = "grey"))+
strip.background = element_rect(color = "grey"))+
guides(fill=guide_legend(title="Cost component"))+
guides(fill=guide_legend(title="Cost component"))+
scale_fill_manual(values = cols)+
scale_fill_manual(values = cols)+
...
@@ -573,18 +573,27 @@ facet_grid(scenario~technology)+
...
@@ -573,18 +573,27 @@ facet_grid(scenario~technology)+
title = element_text(size=14),
title = element_text(size=14),
axis.line = element_line(size = 0.5, colour = "grey"),
axis.line = element_line(size = 0.5, colour = "grey"),
legend.text = element_text(size=14),
legend.text = element_text(size=14),
strip.text = element_text(size=1
4
),
strip.text = element_text(size=1
2
),
strip.background = element_rect(color = "grey"))+
strip.background = element_rect(color = "grey"))+
guides(fill=guide_legend(title="Cost component"))+
guides(fill=guide_legend(title="Cost component"))+
scale_fill_manual(values = cols)+
scale_fill_manual(values = cols)+
labs(y = "Costs [$/pkm]", x="")
labs(y = "Costs [$/pkm]", x="")
plot = list(plot1
,
plot2)
plot = list(plot1
= plot1, plot2 =
plot2)
return(plot)
return(plot)
}
}
costspf(costs_all, rp = regionplot)
p = costspf(costs_all, rp = regionplot)
p
aspect_ratio <- 1.5
height <- 8
ggsave("LDVinccost.png", p$plot1, dpi=500, height = height , width = height * aspect_ratio)
ggsave("LDVtotcost.png", p$plot2, dpi=500, height = height , width = height * aspect_ratio)
```
```
## Sales composition
## Sales composition
...
@@ -778,8 +787,8 @@ pref = pref[year >= 2020 & year <= 2100 & vehicle_type == "Bus_tmp_vehicletype"]
...
@@ -778,8 +787,8 @@ pref = pref[year >= 2020 & year <= 2100 & vehicle_type == "Bus_tmp_vehicletype"]
pref[, vehicle_type := "Buses and Trucks"]
pref[, vehicle_type := "Buses and Trucks"]
p = ggplot()+
p = ggplot()+
geom_line(data = pref, aes(x = year, y = value, group = technology, color = technology))+
geom_line(data = pref, aes(x = year, y = value, group = technology, color =
technology, linetype =
technology))+
facet_wrap(~scenario)+
facet_wrap(~scenario
, ncol = 1
)+
theme_minimal()+
theme_minimal()+
theme(axis.text.x = element_text(angle = 90, hjust = 1),
theme(axis.text.x = element_text(angle = 90, hjust = 1),
axis.text = element_text(size=7),
axis.text = element_text(size=7),
...
@@ -787,15 +796,17 @@ p = ggplot()+
...
@@ -787,15 +796,17 @@ p = ggplot()+
legend.text = element_text(size=7),
legend.text = element_text(size=7),
strip.text = element_text(size=7))+
strip.text = element_text(size=7))+
labs(y = "Preference factor [-]", x="")+
labs(y = "Preference factor [-]", x="")+
scale_color_manual("Technology", values = cols)
scale_color_manual("Technology", values = cols,labels = c("Electric", "FCEV")) +
scale_linetype_manual("Technology", values = c(1,2),
labels = c("Electric", "FCEV"))
return(p)
return(p)
}
}
p = prefBusTrucksplotf(pref_FV_all)
p = prefBusTrucksplotf(pref_FV_all)
p
aspect_ratio <- 1
aspect_ratio <- 1
height <-
3
height <-
4
ggsave("buses_trucks_SW.png", p, dpi=500, height = height , width = height * aspect_ratio)
ggsave("buses_trucks_SW.png", p, dpi=500, height = height , width = height * aspect_ratio)
```
```
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment