"0","ave_house_size <- summarise(house_weight, avg_sq_ft = mean(house_size))"
"0","total_house_size <- summarise(house_weight, total_sq_ft = sum(house_size)) # total sq_Ft from all projects"
"0","number_of_houses <- as.integer(length(house_weight$project))"
"0","house_weight_US_units <- house_weight %>%"
"0","   transmute("
"0","      salvage = total_salvage_quantity  * 2.20462,"
"0","      salvage_quantity_units = ""lbs"","
"0","      dropbox = total_dropbox_quantity * 2.20462,"
"0","      dropbox_units = ""lbs"","
"0","      total_house_weight = salvage + dropbox,"
"0","      total_house_weight_units = ""lbs"","
"0","      percent_salvaged = round(salvage / total_house_weight * 100)"
"0","   ) %>%"
"0","   add_column(project = house_weight$project) %>%"
"0","   add_column(contractor = house_weight$contractor) %>%"
"0","   add_column(house_age = house_weight$house_age) %>%"
"0","   add_column(house_size = house_weight$house_size) %>%"
"0","   mutate(est_weight = house_size * 50) %>%"
"0","   mutate(missing_house_est = est_weight - total_house_weight) %>%"
"0","   mutate(percent_missing = missing_house_est / est_weight * 100)"
"0","# added comparison weight column to detect anomalies in total house weight compared to EPA/METRO estimate house weight"
"0","# based on 50 lbs per sq_ft assumption of residential home weight without concrete foundation"
"0","# https://www.epa.gov/sites/production/files/2016-03/documents/charact_bulding_related_cd.pdf"
"0","# TABLE 5 p27"
"0"," "
"0","# summary data needed for pie chart"
"0","options(digits = 2)"
"0","house_weight_summary <- house_weight %>%"
"0","   summarise_at(c(""total_salvage_quantity"", ""total_dropbox_quantity""), sum ) %>%"
"0","   rename(salvage = total_salvage_quantity) %>%"
"0","   rename(dropbox = total_dropbox_quantity) %>%"
"0","   gather(key = ""material"", value = ""weight_kg"") %>%"
"0","   mutate(lbs = as.integer(weight_kg * 2.20462)) %>%"
"0","   mutate(per_average_project = lbs/number_of_houses) #%>%"
"0","   #mutate(city_wide = per_average_project * 324)"
