Damage vector for life-cycle analysis: Difference between revisions

From Opasnet
Jump to navigation Jump to search
(→‎Formula: ovariablezed)
Line 9: Line 9:
== Answer ==
== Answer ==


There are two parts to this: damage vector and damage factor. For details, see {{resultlink}}.
For an example of an actual LCA, see [[LCA of a coffee cup]].
<rcode name="answer">
library(OpasnetUtils)
# [[Damage vector for life-cycle analysis]]. We need impactsPerDollar, damagesPerImpact, and damages.
objects.latest("Op_en5902", code_name = "initiate")
oprint(head(impactsPerDollar@output))
oprint(head(damagesPerImpact@output))
</rcode>


== Rationale ==
== Rationale ==


=== Data ===
'''Damage vector


The damage vector contains 430 purchasing sectors and 17 unique categories of impact. See {{resultlink}}.


=== Dependencies ===
'''Damage factors


=== Data ===
Damage factors are described in the table below.
 
{{attack|#|The units should be explained!|--[[User:Jouni|Jouni]] ([[User talk:Jouni|talk]]) 07:34, 28 December 2013 (EET)}}


<t2b name="damagefactors" index="Unique_categories,Damage_categories" locations="Human health,Ecosystem quality,Climate change,Resources,Water consumption" unit = "-">
<t2b name="Damage factors" index="Unique_categories,Damage_categories" locations="Human health,Ecosystem quality,Climate change,Resources,Water consumption" unit = "-">
Carcinogens|0.0000028|0|0|0|0
Carcinogens|0.0000028|0|0|0|0
Non-carcinogens|0.0000028|0|0|0|0
Non-carcinogens|0.0000028|0|0|0|0
Line 38: Line 59:
</t2b>
</t2b>


===Example of coffee cup===
===Calculations===
 
<t2b name="Coffee cup inputs" index="Purchasing_sector" obs="Result" unit="Euro">
31131A - Sugar cane mills and refining|0.1
112120 - Dairy cattle and milk production|0.2
311820 - Cookie, cracker, and pasta manufacturing|0.5
311920 - Coffee and tea manufacturing|0.2
221100 - Electric power generation, transmission, and distribution|0.1
322299 - All other converted paper product manufacturing|0.04
335210 - Small electrical appliance manufacturing|0
335221 - Household cooking appliance manufacturing|0.01
</t2b>


===Formula===
<rcode name="initiate" label="Initiate variables" embed=1>
 
<rcode graphics=1>


library(OpasnetUtils)
library(OpasnetUtils)
library(ggplot2)
library(reshape2)


objects.latest("Op_en6007", code_name = "answer") # [[OpasnetUtils/Drafts]]. We need ovaMatrixProduct.
objects.latest("Op_en6007", code_name = "answer") # [[OpasnetUtils/Drafts]]. We need truncateIndex.
 
show_bins <- 10 # How many different direct inputs to show?


# Create the damage factor table based on data from [[Damage vector for life-cycle analysis]]
# Create the damage factor table based on data from [[Damage vector for life-cycle analysis]]


damagesPerImpact <- opbase.data("Op_en5902.damagefactors")
damagesPerImpact <- opbase.data("Op_en5902.damage_factors")
damagesPerImpact$Obs <- NULL
damagesPerImpact$Obs <- NULL
damagesPerImpact <- Ovariable("damagesPerImpact", damagesPerImpact)
damagesPerImpact <- Ovariable("damagesPerImpact", damagesPerImpact)
Line 73: Line 77:
impactsPerDollar <- Ovariable("impactsPerDollar", data = opbase.data("Op_en5902"))
impactsPerDollar <- Ovariable("impactsPerDollar", data = opbase.data("Op_en5902"))


# Take the direct requirements of an activity (in this case, producing a cup of coffee).
activity <- opbase.data("Op_en5902.coffee_cup_inputs")
activity$Obs <- NULL # Remove the redundant Obs column.
cat("Primary prosesses related to a cup of coffee (in Euro)\n")
oprint(activity)
# Combine the direct requirements of a coffee cup with a full vector of requirements and fill empty cells with 0.
activity <- merge(
unique(EvalOutput(impactsPerDollar)@output["Purchasing_sector"]),
activity,
all.x = TRUE
)
activity$Result[is.na(activity$Result)] <- 0
activity <- Ovariable("activity", data = activity)
# Get the normalisation data for different damages and make an ovariable out of it.
normalisation <- opbase.data("Op_en5904") # [[Normalisation data for life cycle assessments]]
normalisation$Obs <- NULL
oprint(head(normalisation))
normalisation <- Ovariable("normalisation", data = normalisation)
##########################333
damagesPerImpact <- EvalOutput(damagesPerImpact, N = 1)
impactsPerDollar <- EvalOutput(impactsPerDollar, N = 1)
activity        <- EvalOutput(activity, N = 1)
normalisation    <- EvalOutput(normalisation, N = 1)
#############################33
oprint(head(impactsPerDollar@output))
oprint(head(damagesPerImpact@output))


damages <- Ovariable("damages",  
damages <- Ovariable("damages",  
Line 146: Line 110:
)
)


damages <- EvalOutput(damages)
objects.store(damagesPerImpact, impactsPerDollar, damages)
 
# Merge all but show_bins largest bins to 'Other'.
 
sums <- as.data.frame(as.table(tapply(damages@output$damagesResult, damages@output["Purchasing_sector"], sum)))
limit <- sort(sums$Freq, decreasing = TRUE)[show_bins]
keeps <- sums[sums$Freq > limit , "Purchasing_sector"]
keeps <- levels(keeps)[keeps]
 
levels(damages@output$Purchasing_sector) <- ifelse(
levels(damages@output$Purchasing_sector) %in% keeps,
levels(damages@output$Purchasing_sector),
"Other"
)
 
# Plot results on a bar graph.
 
cat("Effects smaller than or equal to ", limit / sum(sums$Freq) * 100, " % of the total effect are not shown. Numbers are NOT normalised, because there seems to be something strage in normalisaton.\n")
 
ggplot(damages@output, aes(x = Damage_categories, weight = damagesResult, fill = Purchasing_sector)) + geom_bar() +
theme_grey(base_size = 18) +
theme(axis.text.x = element_text(angle = 45)) +
labs(
title = "Life cycle impacts of a cup of coffee",
x = "Damage",
y = "Amount"
)


</rcode>
</rcode>


==See also==
==See also==
* [[LCA of a coffee cup]]
* [[Normalisation data for life cycle assessments]]


==Keywords==
==Keywords==
Line 185: Line 126:


==Related files==
==Related files==
{{mfiles}}<!-- __OBI_TS:1358344392 -->

Revision as of 05:34, 28 December 2013



Question

What are the damages per unit purchased commodity using a life-cycle assessment?

Answer

There are two parts to this: damage vector and damage factor. For details, see {{#opasnet_base_link:Op_en5902}} .

For an example of an actual LCA, see LCA of a coffee cup.

+ Show code

Rationale

Data

Damage vector

The damage vector contains 430 purchasing sectors and 17 unique categories of impact. See {{#opasnet_base_link:Op_en5902}} .

Damage factors

Damage factors are described in the table below.

⇤--#: . The units should be explained! --Jouni (talk) 07:34, 28 December 2013 (EET) (type: truth; paradigms: science: attack)

Damage factors(-)
ObsUnique_categoriesHuman healthEcosystem qualityClimate changeResourcesWater consumption
1Carcinogens0.00000280000
2Non-carcinogens0.00000280000
3Respiratory inorganics0.00070000
4Ionizing radiation0.000000000210000
5Ozone layer depletion0.001050000
6Respiratory organics0.000002130000
7Aquatic ecotoxicity00.0000502000
8Terrestrial ecotoxicity00.00791000
9Terrestrial acidification/nutrification01.04000
10Land occupation01.09000
11Aquatic acidification00000
12Aquatic eutrophication00000
13Global warming00100
14Non-renewable energy00010
15Mineral extraction00010
16Water withdrawal00000
17Water consumption00001

Calculations

+ Show code

See also

Keywords

References


Related files