"0","material_reuse_impacts <- project_impact_data %>%"
"0","   group_by(scenario, impact_units, SimpleEOLname) %>%"
"0","   summarise(material_impact_sum = sum(material_impacts) ) %>%"
"0","   filter(material_impact_sum != 0) %>%"
"0","   mutate(per_project_material_impact_sum = material_impact_sum/number_of_houses) #%>%"
"0","# city_wide is based on the annual total number of demolition projects for that calendar year"
"0","#  mutate(city_wide_material_impact_sum = per_project_material_impact_sum * 324)"
"0","material_reuse_impacts$SimpleEOLname <- factor(material_reuse_impacts$SimpleEOLname, levels = c('recoverable wood', 'other' , 'nonrecoverable wood', 'metal') )"
"0","carbon_material_reuse_impacts <- filter(material_reuse_impacts, impact_units == ""kg CO2e"") "
"0","energy_material_reuse_impacts <- filter(material_reuse_impacts, impact_units == ""MJ"") #%>%"
"0","   #add_column(roworder = c(1:8)) %>%"
"0","   #arrange(desc(roworder))"
"0","# carbon impacts"
"0","ggplot(carbon_material_reuse_impacts, "
"0","       aes(x = scenario, "
"0","           y = per_project_material_impact_sum, "
"0","           fill = SimpleEOLname)) +"
"0","   geom_bar(stat = ""identity"", "
"0","            position = ""stack"") +"
"0","   geom_hline(yintercept = 0 ) +"
"0","   geom_label_repel(aes(label = format(per_project_material_impact_sum, "
"0","                                digits = 2, "
"0","                                big.mark = "","", "
"0","                                big.interval = 3L,"
"0","                                min.segment.length = unit(0.2, 'lines'))), "
"0","             size = 3.5, "
"0","             position = position_stack(vjust = 0.5),  "
"0","             show.legend = F ) +"
"0","   scale_fill_manual(values = DEQ_pal[11:8], "
"0","                     guide = guide_legend(reverse = TRUE)) +"
"0","   scale_y_continuous(labels = comma ) +"
"0","   labs(x = """", "
"0","        y = ""carbon impact (kg CO2e)"", "
"0","        fill = """") +"
"0","   theme_tufte() +"
"0","   theme(axis.text = element_text(size = 12),"
"0","         axis.title = element_text(size = 12,face = ""bold""),"
"0","         legend.position = ""top"", "
"0","         legend.direction = ""horizontal"")"
