co2-carbon-footprint
Calculate CO2 emissions and carbon footprint from BIM model data. Analyze embodied carbon by material, element, and building system.
What this skill does
# CO2 Carbon Footprint Calculator
## Business Case
### Problem Statement
Sustainability requirements demand carbon tracking:
- Need to quantify embodied carbon
- Material selection impact unclear
- Reporting requirements increasing
- No integration with BIM workflow
### Solution
Calculate CO2 emissions from BIM quantities using EPD (Environmental Product Declaration) data and carbon coefficients.
### Business Value
- **Sustainability** - Meet green building requirements
- **Design optimization** - Identify high-carbon elements
- **Reporting** - Automated carbon reports
- **Decision support** - Compare material alternatives
## Technical Implementation
```python
import pandas as pd
from datetime import datetime
from typing import Dict, Any, List, Optional, Tuple
from dataclasses import dataclass, field
from enum import Enum
class LifeCycleStage(Enum):
"""EN 15978 Life Cycle Stages."""
A1_A3 = "a1_a3" # Product stage
A4 = "a4" # Transport to site
A5 = "a5" # Construction
B1_B7 = "b1_b7" # Use stage
C1_C4 = "c1_c4" # End of life
D = "d" # Beyond system boundary
class MaterialCategory(Enum):
"""Material categories for carbon calculation."""
CONCRETE = "concrete"
STEEL = "steel"
TIMBER = "timber"
ALUMINUM = "aluminum"
GLASS = "glass"
BRICK = "brick"
INSULATION = "insulation"
GYPSUM = "gypsum"
OTHER = "other"
@dataclass
class CarbonCoefficient:
"""Carbon emission coefficient for a material."""
material: str
category: MaterialCategory
kgco2_per_unit: float # kg CO2e per unit
unit: str # kg, m3, m2, etc.
stage: LifeCycleStage
source: str # EPD reference
uncertainty: float = 0.1 # 10% default uncertainty
@dataclass
class CarbonResult:
"""Carbon calculation result for an element."""
element_id: str
element_name: str
material: str
category: MaterialCategory
quantity: float
unit: str
kgco2_per_unit: float
total_kgco2: float
stage: LifeCycleStage
level: str = ""
notes: str = ""
@dataclass
class CarbonSummary:
"""Carbon footprint summary."""
total_kgco2: float
total_tonco2: float
by_material: Dict[str, float]
by_category: Dict[str, float]
by_stage: Dict[str, float]
by_level: Dict[str, float]
element_count: int
gfa: float # Gross Floor Area
kgco2_per_m2: float
class CarbonCoefficientDatabase:
"""Database of carbon emission coefficients."""
def __init__(self):
self.coefficients: List[CarbonCoefficient] = []
self._load_default_coefficients()
def _load_default_coefficients(self):
"""Load standard carbon coefficients (EPD-based)."""
# Concrete products
self.add_coefficient(CarbonCoefficient(
material="Concrete C30/37", category=MaterialCategory.CONCRETE,
kgco2_per_unit=250, unit="m3", stage=LifeCycleStage.A1_A3,
source="Generic EPD - Concrete"
))
self.add_coefficient(CarbonCoefficient(
material="Concrete C40/50", category=MaterialCategory.CONCRETE,
kgco2_per_unit=300, unit="m3", stage=LifeCycleStage.A1_A3,
source="Generic EPD - High Strength Concrete"
))
self.add_coefficient(CarbonCoefficient(
material="Reinforcement Steel", category=MaterialCategory.STEEL,
kgco2_per_unit=1.99, unit="kg", stage=LifeCycleStage.A1_A3,
source="Generic EPD - Rebar"
))
# Steel products
self.add_coefficient(CarbonCoefficient(
material="Structural Steel", category=MaterialCategory.STEEL,
kgco2_per_unit=2.5, unit="kg", stage=LifeCycleStage.A1_A3,
source="Generic EPD - Structural Steel"
))
self.add_coefficient(CarbonCoefficient(
material="Steel Sheet", category=MaterialCategory.STEEL,
kgco2_per_unit=2.3, unit="kg", stage=LifeCycleStage.A1_A3,
source="Generic EPD - Sheet Metal"
))
# Timber products
self.add_coefficient(CarbonCoefficient(
material="Softwood Timber", category=MaterialCategory.TIMBER,
kgco2_per_unit=-500, unit="m3", stage=LifeCycleStage.A1_A3,
source="Generic EPD - CLT (carbon sequestration)"
))
self.add_coefficient(CarbonCoefficient(
material="Glulam", category=MaterialCategory.TIMBER,
kgco2_per_unit=-350, unit="m3", stage=LifeCycleStage.A1_A3,
source="Generic EPD - Glued Laminated Timber"
))
# Aluminum
self.add_coefficient(CarbonCoefficient(
material="Aluminum Profile", category=MaterialCategory.ALUMINUM,
kgco2_per_unit=8.0, unit="kg", stage=LifeCycleStage.A1_A3,
source="Generic EPD - Aluminum"
))
# Glass
self.add_coefficient(CarbonCoefficient(
material="Float Glass", category=MaterialCategory.GLASS,
kgco2_per_unit=15.0, unit="m2", stage=LifeCycleStage.A1_A3,
source="Generic EPD - Float Glass"
))
self.add_coefficient(CarbonCoefficient(
material="Double Glazing Unit", category=MaterialCategory.GLASS,
kgco2_per_unit=35.0, unit="m2", stage=LifeCycleStage.A1_A3,
source="Generic EPD - IGU"
))
# Masonry
self.add_coefficient(CarbonCoefficient(
material="Clay Brick", category=MaterialCategory.BRICK,
kgco2_per_unit=0.24, unit="kg", stage=LifeCycleStage.A1_A3,
source="Generic EPD - Clay Brick"
))
# Insulation
self.add_coefficient(CarbonCoefficient(
material="Mineral Wool", category=MaterialCategory.INSULATION,
kgco2_per_unit=1.2, unit="kg", stage=LifeCycleStage.A1_A3,
source="Generic EPD - Mineral Wool"
))
self.add_coefficient(CarbonCoefficient(
material="EPS Insulation", category=MaterialCategory.INSULATION,
kgco2_per_unit=3.5, unit="kg", stage=LifeCycleStage.A1_A3,
source="Generic EPD - EPS"
))
# Gypsum
self.add_coefficient(CarbonCoefficient(
material="Gypsum Board", category=MaterialCategory.GYPSUM,
kgco2_per_unit=2.8, unit="m2", stage=LifeCycleStage.A1_A3,
source="Generic EPD - Plasterboard"
))
def add_coefficient(self, coefficient: CarbonCoefficient):
"""Add carbon coefficient to database."""
self.coefficients.append(coefficient)
def find_coefficient(self, material_name: str,
stage: LifeCycleStage = LifeCycleStage.A1_A3) -> Optional[CarbonCoefficient]:
"""Find matching coefficient for material."""
material_lower = material_name.lower()
# Direct match
for coef in self.coefficients:
if coef.material.lower() == material_lower and coef.stage == stage:
return coef
# Partial match
for coef in self.coefficients:
if material_lower in coef.material.lower() or coef.material.lower() in material_lower:
if coef.stage == stage:
return coef
# Category match
category = self._guess_category(material_name)
for coef in self.coefficients:
if coef.category == category and coef.stage == stage:
return coef
return None
def _guess_category(self, material_name: str) -> MaterialCategory:
"""Guess material category from name."""
name_lower = material_name.lower()
if any(w in name_lower for w in ['concrete', 'cement', 'mortar']):
return MaterialCategory.CONCRETE
if any(w in name_lower for w in ['steel', 'iron', 'metal']):
return MaterialCategory.STEEL
if any(w in name_lower for w in ['wood', 'timber', 'lumber', 'plywood', 'clt']):
return MateriaRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.