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 impactactivity_name,activity_code,locationabsolute_score: Contribution in impact unitsfraction: Fraction of total impact (0–1)life_cycle_stage: Inherited from foreground activity metadataclassification: ISIC categoryecoquery_url: Direct link to activity in EcoQuerytotal_score: Total impact of the functional unitunit: 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) fromcreate_activity/update_activitypropagates automatically to hotspot results - Results are visualized as a Sankey diagram in the Workspace
Related Tools¶
- calculate_custom — Full LCA calculation on a custom project
- get_task_status — Retrieve hotspot results
- create_activity — Define lifecycle stage metadata on activities