Impact categories

This method returns the \(l\) impact categories of a result. The rows of the impact matrix \(C\) are indexed by these impact categories and the columns by the \(m\) intervention flows of the system. \(C\) contains the respective characterisation factors of the intervention flows.

$$ C \in \mathbb{R}^{l \times m} $$

RESTresult/{result-id}/impact-categories
IPCresult/impact-categories
Python IPCResult.get_impact_categories
Return typeList[Ref[ImpactCategory]]

Examples

Python IPC

impact_categories = result.get_impact_categories()
print(
    pd.DataFrame(
        [(i.name, i.ref_unit) for i in impact_categories],
        columns=["Impact category", "Unit"],
    )
)

#   Impact category         Unit
# 0            OZON  kg CFC11-eq
# 1            EUTR      kg N eq
# 2            SMOG     kg O3 eq
# 3             HNC         CTUh
# 4            ETOX         CTUe
# 5              HC         CTUh
# 6            HRSP  kg PM2.5 eq
# 7             GCC    kg CO2 eq
# 8            HTOX         CTUh
# 9            ACID    kg SO2-eq

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/impact-categories",
      params: {
        "@id": "4780f66c-0b77-49ca-9226-c7ce4447ea2d",
      }
    })
  });
  let v = await resp.json();
  console.log(v);
  // {
  //   jsonrpc: "2.0",
  //   result: [
  //     {
  //       "@type": "ImpactCategory",
  //       "@id": "2dddb0a4-2f97-3fef-a4e6-708f0b4c2554",
  //       name: "Human toxicity, cancer - inorganics",
  //       category: "EF 3.0 Method (adapted)",
  //       refUnit: "CTUh"
  //     },
  //     {
  //       "@type": "ImpactCategory",
  //       "@id": "248a3f3f-933e-3c45-a799-fad9f956e03c",
  //       name: "Photochemical ozone formation",
  //       category: "EF 3.0 Method (adapted)",
  //       refUnit: "kg NMVOC eq"
  //     },