Difference between revisions of "Cradle through consumer BEA"
From Testiwiki
(→Dependencies) |
(code updated, now works. Documentation improved) |
||
Line 8: | Line 8: | ||
== Answer == | == Answer == | ||
+ | <rcode name="answer" embed=1> | ||
+ | library(OpasnetUtils) | ||
+ | |||
+ | objects.latest("Op_en6286", code_name = "initiate") # [[Cradle through consumer BEA]] | ||
+ | |||
+ | oprint(head(EvalOutput(BEA)@output)) | ||
+ | |||
+ | </rcode> | ||
== Rationale == | == Rationale == | ||
− | <ref>Greg Norris: Personal communication 31 Jan 2014.</ref> | + | <ref>Greg Norris: Personal communication 31 Jan 2014. File name: \\cesium\jtue$\_Documents\Handprinter\CradleThroughConsumerBEA.xls </ref> |
=== Dependencies === | === Dependencies === | ||
− | [http://en.opasnet.org/en-opwiki/index.php?title=Cradle_through_consumer_BEA&oldid=31473 Code that was used to upload the data] on 5 Feb 2014. | + | [http://en.opasnet.org/en-opwiki/index.php?title=Cradle_through_consumer_BEA&oldid=31473 Code that was used to upload the data] on 5 Feb 2014. [http://en.opasnet.org/en-opwiki/index.php?title=Cradle_through_consumer_BEA&oldid=31477 Upload history] |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | [http://en.opasnet.org/en-opwiki/index.php?title= | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Calculations === | === Calculations === | ||
Line 44: | Line 30: | ||
library(OpasnetUtils) | library(OpasnetUtils) | ||
+ | categories <- opbase.data("Op_en6286", subset = "Categories") | ||
climate <- opbase.data("Op_en6286", subset = "Climate change") | climate <- opbase.data("Op_en6286", subset = "Climate change") | ||
ecosystem <- opbase.data("Op_en6286", subset = "Ecosystem quality") | ecosystem <- opbase.data("Op_en6286", subset = "Ecosystem quality") | ||
Line 52: | Line 39: | ||
water$Result <- water$Result * 3.785411784 # From gallons to litres | water$Result <- water$Result * 3.785411784 # From gallons to litres | ||
− | + | levels(categories[["Category"]]) <- gsub(" ", "", levels(categories[["Category"]])) | |
− | levels(categories[["Category"]]) <- gsub(" ", "", levels(categories[["Category"]])) | + | # One trailing space may stay but $ does not work in regular expression. Why? |
− | # One | ||
− | categories <- Ovariable("categories", data = categories, Result = 1 | + | categories <- Ovariable("categories", data = categories, Result = 1) |
BEA <- rbind( | BEA <- rbind( | ||
− | data.frame(Impact = "Climate change", Unit = "CO2eq /USD", climate | + | data.frame(Impact = "Climate change", Unit = "CO2eq /USD", climate), |
data.frame(Impact = "Ecosystem quality", Unit = "PDF m2 /a /USD", ecosystem), | data.frame(Impact = "Ecosystem quality", Unit = "PDF m2 /a /USD", ecosystem), | ||
data.frame(Impact = "Human health", Unit = "DALY /USD", health), | data.frame(Impact = "Human health", Unit = "DALY /USD", health), | ||
Line 81: | Line 67: | ||
<references/> | <references/> | ||
− | ==Related files== | + | ==Related files== |
Revision as of 11:50, 13 March 2014
This page is a variable.
The page identifier is Op_en6286 |
---|
Moderator:Jouni (see all) |
Give your opinion to the peer rating of the content of this page. |
Upload data
|
Contents
Question
What are the life-cycle impacts of products from cradle to consumer?
Answer
Rationale
Dependencies
Code that was used to upload the data on 5 Feb 2014. Upload history
Calculations
See also
Keywords
References
- ↑ Greg Norris: Personal communication 31 Jan 2014. File name: \\cesium\jtue$\_Documents\Handprinter\CradleThroughConsumerBEA.xls