"0","decon$material_impact_units <- str_replace(decon$material_impact_units, "" "", """")"
"0","decon_transport <- decon %>%"
"0","   rename(impact_units = material_impact_units) %>%"
"0","   mutate(site_to_retail_transport_impact = case_when("
"0","      disposition == ""reuse"" & impact_units == ""kgCO2e"" ~ quantity * as.numeric(routes[2,9]),"
"0","      disposition == ""reuse"" & impact_units == ""MJ"" ~ quantity * as.numeric(routes[2,10]))"
"0","      ) %>%"
"0","   left_join(dropbox_site_transport, by = c(""project"", ""contractor"", ""deconMaterialName"", ""disposition"", ""SimpleEOLname"", c(""quantity"" = ""dropbox_EOL_kg""), c(""impact_units"" = ""dropbox_to_transfer_units"") )) %>%"
"0","   left_join(dropbox_EOL_transport, by = c(""project"", ""contractor"", ""deconMaterialName"", ""disposition"", ""SimpleEOLname"", c(""quantity"" = ""dropbox_EOL_kg""), c(""impact_units"" = ""transfer_to_EOL_units"") )) %>%"
"0","   mutate(site_transport_impact = if_else("
"0","      disposition == ""reuse"", .$site_to_retail_transport_impact, .$dropbox_to_transfer)) %>%"
"0","   mutate(EOL_transport_impact = if_else("
"0","      disposition == ""reuse"", 0, .$transfer_to_EOL"
"0","   )) %>%"
"0","   select(""house_age"", ""house_size"", ""project"", ""contractor"", ""deconMaterialName"", ""SimpleEOLname"", ""disposition"", ""quantity"", ""quantity_units"", ""material_impacts"", ""site_transport_impact"", ""EOL_transport_impact"", ""impact_units"")"
"0","# save this file for the final net benefits calculation and for exploratory graphics"
"0","write.csv(decon_transport, ""intermediary/final_deconstruction_scenario_with_transport.csv"")"
