Technosphere flows
This method returns the \(n\) technosphere flows of a result. These are the flows by which the processes of the calculated system are linked. Each technosphere flow is a pair of a product or waste flow and a provider where the provider is typically a process but can also be a product system (a sub-system) or even another result. The technosphere matrix \(A\) is symmetrically indexed by these technosphere flows:
$$ A \in \mathbb{R}^{n \times n} $$
REST | result/{result-id}/tech-flows |
IPC | result/tech-flows |
Python IPC | Result.get_tech_flows |
Return type | List[TechFlow] |
Examples
Python IPC
tech_flows = result.get_tech_flows()
print(
pd.DataFrame(
[
(tf.provider.name, tf.flow.name, tf.flow.ref_unit)
for tf in tech_flows
],
columns=["Provider", "Flow", "Unit"],
).head()
)
# Provider Flow Unit
# 0 Fresh wheat, corn, rice, and oth... Fresh wheat, corn, ric... USD
# 1 Synthetic dyes and pigments... Synthetic dyes an... USD
# 2 Cardboard containers... Cardboard ... USD
# 3 Synthetic rubber and artificial ... Synthetic rubber and a... USD
# 4 Packaged poultry... Packag... USD
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/tech-flows",
params: {
"@id": "77ccaffa-9d79-4f38-8da5-4413469b8a7b",
}
})
});
let v = await resp.json();
console.log(v);
// {
// jsonrpc: "2.0",
// id: 1,
// result: [
// {
// provider: {
// "@type": "Process",
// "@id": "7c619276-7b15-472a-b261-0110d461755a",
// name: "market for natural gas, high pressure",
// processType: "LCI_RESULT",
// flowType: "PRODUCT_FLOW"
// },
// flow: {
// "@type": "Flow",
// "@id": "a9007f10-7e39-4d50-8f4a-d6d03ce3d673",
// name: "natural gas, high pressure",