-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add category labels so that all figs draw
- Loading branch information
Showing
2 changed files
with
10 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,8 @@ | |
# Read, Q. D., et al. 2019. Assessing the environmental impacts of halving food loss and waste along the food supply chain. Science of the Total Environment. # | ||
# # | ||
# Code to reproduce all analyses in manuscript, beginning with cleaned data # | ||
# Last modified by QDR on 06 January 2020 # | ||
# Last modified by QDR on 07 January 2020 # | ||
# Tested with R version 3.6.2 on Windows and Linux # | ||
# Contact: [email protected] # | ||
################################################################################################################################################################# | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
# Read, Q. D., et al. 2019. Assessing the environmental impacts of halving food loss and waste along the food supply chain. Science of the Total Environment. # | ||
# # | ||
# Code to reproduce all data figures in manuscript (Figures 2, 3, and 4), beginning with output generated by analysis.R # | ||
# Last modified by QDR on 06 January 2020 # | ||
# Last modified by QDR on 07 January 2020 # | ||
# Tested with R version 3.6.2 on Windows and Linux # | ||
# Contact: [email protected] # | ||
################################################################################################################################################################# | ||
|
||
|
@@ -25,6 +26,12 @@ results_by_commodity_df <- read.csv('output/bestpathway_bycommodity.csv', string | |
# Figure 2 # | ||
############ | ||
|
||
category_labels_expression <- list("Eutrophication potential (kg N eq.)", | ||
expression(paste("GHG emissions (kg ", CO[2], " eq.)")), | ||
"Energy use (GJ)", | ||
expression(paste("Land used (", m^2, ")")), | ||
expression(paste("Water used ", (m^3)))) | ||
|
||
waste_impacts <- base_and_nowaste %>% | ||
mutate(scenario = if_else(rowSums(.[,1:6]) == 0, 'baseline', 'zero_waste')) %>% | ||
select(scenario, impact_category, value) %>% | ||
|