Skip to content

calculate_hotspots_custom

Run a hotspot analysis on a custom LCA project to identify the most impactful processes.

Purpose

Calculates environmental impacts for a custom project and returns a ranked list of hotspots — the background Ecoinvent activities that contribute most to total impact. Each result includes foreground attribution, lifecycle stage, ISIC classification, and a direct link to the EcoQuery database entry.

Parameters

Parameter Type Required Description
project_id string Yes Project UUID
activity_code string Yes Functional unit activity code within the project
activity_name string Yes Name of the functional unit activity
database string Yes Base Ecoinvent database (e.g., "ecoinvent-3.12-cutoff")
method_name string Yes Impact assessment method
method_category string Yes Impact category within the method
amount number No Functional unit amount (default: 1)
top_n integer No Number of top hotspots to return (default: 20)

Returns

A task ID — poll with get_task_status to retrieve results. The result contains:

  • hotspots: Ranked list of background processes contributing to impact
  • activity_name, activity_code, location
  • absolute_score: Contribution in impact units
  • fraction: Fraction of total impact (0–1)
  • life_cycle_stage: Inherited from foreground activity metadata
  • classification: ISIC category
  • ecoquery_url: Direct link to activity in EcoQuery
  • total_score: Total impact of the functional unit
  • unit: Impact unit

Example

Prompt: Run hotspot analysis for my battery project using IPCC 2021 climate change

Workflow:

1. calculate_hotspots_custom(project_id, activity_code, ...) → task_id
2. get_task_status(task_id) → poll until COMPLETED
3. Interpret ranked hotspot list

Notes

  • Uses BFS foreground ancestry to assign each background process to the most relevant foreground activity
  • Lifecycle stage metadata (life_cycle_stage, hierarchy_level) from create_activity / update_activity propagates automatically to hotspot results
  • Results are visualized as a Sankey diagram in the Workspace