Direct process result

This method returns the direct impacts of a process \(j\) in the calculated product system. Mathematically, it is the column \(H[:, j]\) of the direct impact matrix:

$$ H = C * B * diag(s) $$

RESTGET result/{result-id}/direct-impacts-of/{tech-flow}
IPCresult/direct-impacts-of
Python IPCResult.get_direct_impacts_of
Return typeList[ImpactValue]
Parameter typeTechFlow

It is also possible to get the direct process result \(H[k, j]\) for a single impact category \(k\):

RESTGET result/{result-id}/direct-impact-of/{impact-category}/{tech-flow}
IPCresult/direct-impact-of
Python IPCResult.get_direct_impact_of
Return typeImpactValue
Parameter typeRef[ImpactCategory]
Parameter typeTechFlow

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/direct-impacts-of",
      params: {
        "@id": "86b36d3b-1dba-4804-bd61-dc5bcaf7c86c",
        techFlow: {
          provider: { "@id": "37eb4bf5-9fbc-4caf-a24a-0e0b71b997dd" },
          flow: { "@id": "817c3650-4fed-4ef2-b9b6-404a198834e6" }
        }
      }
    })
  });
  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: 0.0008854099635082675
  //     },
  //  ...