Weighted results
This method returns the weighted impact assessment result of the calculated product system. Mathematically, it is the impact assessment result \(h\) devided by the respective normalization values \(nv\) and multiplied with the respective weighting factors \(w\):
$$ diag(w) * diag(nv)^{-1} * h $$
REST | GET result/{result-id}/total-impacts/weighted |
IPC | result/total-impacts/weighted |
Python IPC | Result.get_total_impacts_weighted |
Return type | List[ImpactValue] |
Examples
JSON-RPC via Fetch API
The example below shows the usage of this method using the JSON-RPC protocol via the Fetch API which is available in modern web-browsers or platforms like Deno.
let resp = await fetch("http://localhost:8080", {
method: "POST",
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "result/total-impacts/weighted",
params: {
"@id": "546a1d13-3cae-4c9b-82d0-a18204b0c6eb",
}
})
});
let v = await resp.json();
console.log(v);
//{
// jsonrpc: "2.0",
// result: [
// {
// {
// impactCategory: {
// "@type": "ImpactCategory",
// "@id": "3bc1c67f-d3e3-3891-9fea-4512107d88ef",
// name: "Climate change",
// category: "EF 3.0 Method (adapted)",
// refUnit: "kg CO2 eq"
// },
// amount: 2.038186234380937
// },
// },