> ## Documentation Index
> Fetch the complete documentation index at: https://code.dcycle.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Category 2: Indirect Energy Emissions

> Quantify indirect GHG emissions from purchased electricity, heat, steam, and cooling

## Understanding Indirect Energy Emissions

**Category 2** under ISO 14064-1 covers indirect GHG emissions from the generation of imported (purchased) electricity, heat, steam, or cooling consumed by your organization. While these emissions physically occur at the power plant or utility facility, they are attributed to your organization as the consumer.

```
┌─────────────────────────────────────────────────────────────────────────────────┐
│              CATEGORY 2: INDIRECT GHG EMISSIONS FROM IMPORTED ENERGY            │
├─────────────────────────────────────────────────────────────────────────────────┤
│                                                                                 │
│  YOUR ORGANIZATION                              ENERGY PROVIDER                 │
│  ─────────────────                              ───────────────                 │
│                                                                                 │
│  ┌───────────────────┐    ← Electricity ←    ┌───────────────────┐             │
│  │                   │    ← Heat/Steam  ←    │                   │             │
│  │   Office          │    ← Cooling     ←    │   Power Plant     │             │
│  │   Factory         │                       │   District Heat   │             │
│  │   Warehouse       │                       │   CHP Plant       │             │
│  │                   │                       │                   │             │
│  │  REPORTS EMISSIONS│                       │  GENERATES        │             │
│  │  (Category 2)     │                       │  EMISSIONS        │             │
│  └───────────────────┘                       └───────────────────┘             │
│                                                                                 │
└─────────────────────────────────────────────────────────────────────────────────┘
```

<Note>
  **Indirect Energy Emission Formula**

  **Category 2 Emissions = Energy Consumed × Grid/Supplier Emission Factor**

  Where:

  * **Energy Consumed**: kWh of electricity, MJ of heat/cooling
  * **Emission Factor**: kg CO₂e per kWh (varies by grid region or supplier)
</Note>

## Prerequisites

Before starting, ensure you have:

* Dcycle API credentials ([get them here](/docs/quickstart#step-1-get-your-api-key))
* At least one facility configured in Dcycle
* Energy invoices or meter readings (electricity, gas, heat)

<Tip>
  **Using the Dcycle App?**

  Upload energy invoices directly through the web interface:

  * [Facilities](https://app.dcycle.io/facilities) - Manage your facilities
  * [Invoices](https://app.dcycle.io/invoices) - Upload and track energy consumption
</Tip>

## Data Map: Category 2 Requirements

```
┌─────────────────────────────────────────────────────────────────────────────────────────┐
│                      CATEGORY 2 DATA REQUIREMENTS                                       │
├─────────────────────────────────────────────────────────────────────────────────────────┤
│                                                                                         │
│  ┌─────────────────────────────────────────────────────────────────────────────────┐   │
│  │ PURCHASED ELECTRICITY                                                           │   │
│  ├─────────────────────────────────────────────────────────────────────────────────┤   │
│  │                                                                                 │   │
│  │  Facility Info             Consumption Data          Supplier Info              │   │
│  │  ────────────────          ────────────────          ─────────────              │   │
│  │  • Facility ID             • kWh consumed            • Supplier name            │   │
│  │  • Grid region             • Invoice period          • Contract type            │   │
│  │  • Country                 • Peak/off-peak           • Renewable %              │   │
│  │                            • Reactive power                                     │   │
│  │                                                                                 │   │
│  └─────────────────────────────────────────────────────────────────────────────────┘   │
│                                                                                         │
│  ┌─────────────────────────────────────────────────────────────────────────────────┐   │
│  │ PURCHASED HEAT & STEAM                                                          │   │
│  ├─────────────────────────────────────────────────────────────────────────────────┤   │
│  │                                                                                 │   │
│  │  District Heating          Consumption               Heat Source                │   │
│  │  ────────────────          ───────────               ───────────                │   │
│  │  • Facility ID             • MWh or GJ consumed      • Heat source type         │   │
│  │  • Connection point        • Invoice period          • CHP efficiency           │   │
│  │                            • Temperature level       • Fuel mix                 │   │
│  │                                                                                 │   │
│  └─────────────────────────────────────────────────────────────────────────────────┘   │
│                                                                                         │
│  ┌─────────────────────────────────────────────────────────────────────────────────┐   │
│  │ PURCHASED COOLING                                                               │   │
│  ├─────────────────────────────────────────────────────────────────────────────────┤   │
│  │                                                                                 │   │
│  │  District Cooling          Consumption               System Details             │   │
│  │  ────────────────          ───────────               ──────────────             │   │
│  │  • Facility ID             • MWh or ton-hours        • Cooling technology       │   │
│  │  • Service provider        • Invoice period          • COP rating               │   │
│  │                                                                                 │   │
│  └─────────────────────────────────────────────────────────────────────────────────┘   │
│                                                                                         │
└─────────────────────────────────────────────────────────────────────────────────────────┘
```

## Purchased Electricity

Track emissions from purchased electricity consumption at your facilities.

### Location-Based vs Market-Based Methods

ISO 14064-1 allows two accounting methods for electricity emissions:

<Tabs>
  <Tab title="Location-Based">
    Uses **grid average emission factors** based on where electricity is consumed.

    ```
    Location-Based Calculation

    Your Facility (Spain) ← Grid Electricity ← Spanish Grid (mix of sources)
                                                    │
                                                    ├── Nuclear (22%)
                                                    ├── Wind (24%)
                                                    ├── Gas (17%)
                                                    ├── Solar (10%)
                                                    └── Other (27%)
                                                    
    Emission Factor = Average of all grid sources
    ```

    **Use when:**

    * You don't have supplier-specific data
    * Reporting regional grid impacts
    * Required by specific regulations

    <Tip>
      Dcycle automatically applies location-based factors based on facility country.
    </Tip>
  </Tab>

  <Tab title="Market-Based">
    Uses **supplier-specific emission factors** based on contractual arrangements.

    ```
    Market-Based Calculation

    Your Facility ← Contract ← Specific Supplier
                                    │
                                    └── Renewable Energy Certificate (REC)
                                        OR Specific generation mix
                                        OR Residual mix (if no contract)

    Emission Factor = Based on your specific contract/certificate
    ```

    **Use when:**

    * You have renewable energy contracts
    * Purchasing Guarantees of Origin (GOs) or RECs
    * Showing impact of procurement decisions

    <Tip>
      Provide supplier details to enable market-based calculations.
    </Tip>
  </Tab>
</Tabs>

### Step 1: Record Electricity Invoice

<Accordion title="📋 Data Map: Electricity Invoice">
  | Field                  | Type   | Required | Description              | Example         |
  | ---------------------- | ------ | -------- | ------------------------ | --------------- |
  | `facility_id`          | UUID   | ✅        | Reference to facility    | `"abc-123-..."` |
  | `energy_type`          | string | ✅        | Type of energy           | `"electricity"` |
  | `quantity`             | number | ✅        | Amount consumed          | `25000`         |
  | `unit`                 | string | ✅        | Unit of measurement      | `"kWh"`         |
  | `start_date`           | date   | ✅        | Invoice period start     | `"2024-01-01"`  |
  | `end_date`             | date   | ✅        | Invoice period end       | `"2024-01-31"`  |
  | `supplier`             | string | ❌        | Energy supplier name     | `"Iberdrola"`   |
  | `renewable_percentage` | number | ❌        | % from renewable sources | `100`           |

  **Where to get this data:**

  * **Consumption**: Electricity invoices, smart meter readings
  * **Supplier details**: Contract documents, supplier certificates
  * **Renewable %**: Guarantees of Origin, supplier mix disclosure
</Accordion>

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import requests
  import os

  headers = {
      "Authorization": f"Bearer {os.getenv('DCYCLE_API_KEY')}",
      "Content-Type": "application/json",
      "x-organization-id": os.getenv("DCYCLE_ORG_ID"),
      "x-user-id": os.getenv("DCYCLE_USER_ID"),
  }

  # Record electricity consumption
  electricity_invoice = {
      "facility_id": "your-facility-uuid",
      "energy_type": "electricity",
      "quantity": 25000,
      "unit": "kWh",
      "start_date": "2024-01-01",
      "end_date": "2024-01-31",
      "supplier": "Iberdrola",
  }

  response = requests.post(
      "https://api.dcycle.io/v1/invoices",
      headers=headers,
      json=electricity_invoice,
  )

  invoice = response.json()
  print(f"✅ Electricity invoice recorded: {invoice['id']}")
  print(f"   Consumption: {invoice['quantity']} kWh")
  print(f"   Location-based CO₂e: {invoice['co2e_location']} kg")
  print(f"   Market-based CO₂e: {invoice['co2e_market']} kg")
  print(f"   ISO 14064-1 Category: 2 (Indirect - Imported energy)")
  ```

  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const axios = require('axios');

  const headers = {
    Authorization: `Bearer ${process.env.DCYCLE_API_KEY}`,
    'Content-Type': 'application/json',
    'x-organization-id': process.env.DCYCLE_ORG_ID,
    'x-user-id': process.env.DCYCLE_USER_ID,
  };

  // Record electricity consumption
  const electricityInvoice = {
    facility_id: 'your-facility-uuid',
    energy_type: 'electricity',
    quantity: 25000,
    unit: 'kWh',
    start_date: '2024-01-01',
    end_date: '2024-01-31',
    supplier: 'Iberdrola',
  };

  const response = await axios.post(
    'https://api.dcycle.io/v1/invoices',
    electricityInvoice,
    { headers }
  );

  const invoice = response.data;
  console.log(`✅ Electricity invoice recorded: ${invoice.id}`);
  console.log(`   Consumption: ${invoice.quantity} kWh`);
  console.log(`   Location-based CO₂e: ${invoice.co2e_location} kg`);
  console.log(`   Market-based CO₂e: ${invoice.co2e_market} kg`);
  console.log(`   ISO 14064-1 Category: 2 (Indirect - Imported energy)`);
  ```
</CodeGroup>

### Renewable Electricity

For facilities with renewable energy contracts:

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Record 100% renewable electricity
renewable_invoice = {
    "facility_id": "your-facility-uuid",
    "energy_type": "electricity",
    "quantity": 25000,
    "unit": "kWh",
    "start_date": "2024-01-01",
    "end_date": "2024-01-31",
    "supplier": "Green Energy Provider",
    "renewable_percentage": 100,  # 100% renewable
    "certificate_type": "guarantee_of_origin",
}

response = requests.post(
    "https://api.dcycle.io/v1/invoices",
    headers=headers,
    json=renewable_invoice,
)

invoice = response.json()
print(f"✅ Renewable electricity recorded")
print(f"   Location-based CO₂e: {invoice['co2e_location']} kg")
print(f"   Market-based CO₂e: {invoice['co2e_market']} kg (0 with 100% renewable)")
```

<Note>
  **Dual Reporting Recommendation**

  ISO 14064-1 recommends reporting both location-based and market-based emissions when applicable. This provides:

  * **Location-based**: Regional grid impact
  * **Market-based**: Impact of procurement decisions

  Dcycle calculates both automatically.
</Note>

## Purchased Heat & Steam

Track emissions from district heating or purchased steam.

<Accordion title="📋 Data Map: Heat/Steam Invoice">
  | Field         | Type   | Required | Description           | Example              |
  | ------------- | ------ | -------- | --------------------- | -------------------- |
  | `facility_id` | UUID   | ✅        | Reference to facility | `"abc-123-..."`      |
  | `energy_type` | string | ✅        | Type of energy        | `"heat"`, `"steam"`  |
  | `quantity`    | number | ✅        | Amount consumed       | `500`                |
  | `unit`        | string | ✅        | Unit of measurement   | `"MWh"`, `"GJ"`      |
  | `start_date`  | date   | ✅        | Invoice period start  | `"2024-01-01"`       |
  | `end_date`    | date   | ✅        | Invoice period end    | `"2024-01-31"`       |
  | `supplier`    | string | ❌        | Heat supplier name    | `"District Heat Co"` |

  **Where to get this data:**

  * **Consumption**: District heating invoices, steam meters
  * **Supplier**: Heat supply contracts
</Accordion>

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  # Record district heating consumption
  heat_invoice = {
      "facility_id": "your-facility-uuid",
      "energy_type": "heat",
      "quantity": 150,
      "unit": "MWh",
      "start_date": "2024-01-01",
      "end_date": "2024-01-31",
      "supplier": "City District Heating",
  }

  response = requests.post(
      "https://api.dcycle.io/v1/invoices",
      headers=headers,
      json=heat_invoice,
  )

  invoice = response.json()
  print(f"✅ District heating recorded: {invoice['id']}")
  print(f"   Heat consumed: {invoice['quantity']} MWh")
  print(f"   CO₂e: {invoice['co2e']} kg")
  print(f"   ISO 14064-1 Category: 2 (Indirect - Imported energy)")
  ```

  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  // Record district heating consumption
  const heatInvoice = {
    facility_id: 'your-facility-uuid',
    energy_type: 'heat',
    quantity: 150,
    unit: 'MWh',
    start_date: '2024-01-01',
    end_date: '2024-01-31',
    supplier: 'City District Heating',
  };

  const response = await axios.post(
    'https://api.dcycle.io/v1/invoices',
    heatInvoice,
    { headers }
  );

  const invoice = response.data;
  console.log(`✅ District heating recorded: ${invoice.id}`);
  console.log(`   Heat consumed: ${invoice.quantity} MWh`);
  console.log(`   CO₂e: ${invoice.co2e} kg`);
  console.log(`   ISO 14064-1 Category: 2 (Indirect - Imported energy)`);
  ```
</CodeGroup>

## Purchased Cooling

Track emissions from district cooling systems.

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Record district cooling consumption
cooling_invoice = {
    "facility_id": "your-facility-uuid",
    "energy_type": "cooling",
    "quantity": 80,
    "unit": "MWh",
    "start_date": "2024-07-01",
    "end_date": "2024-07-31",
    "supplier": "City District Cooling",
}

response = requests.post(
    "https://api.dcycle.io/v1/invoices",
    headers=headers,
    json=cooling_invoice,
)

invoice = response.json()
print(f"✅ District cooling recorded: {invoice['id']}")
print(f"   Cooling consumed: {invoice['quantity']} MWh")
print(f"   CO₂e: {invoice['co2e']} kg")
print(f"   ISO 14064-1 Category: 2 (Indirect - Imported energy)")
```

<Warning>
  **Don't Double Count!**

  If your cooling is generated on-site using purchased electricity:

  * The electricity is Category 2
  * The cooling itself is NOT reported separately (would be double counting)

  Only report purchased district cooling as a separate Category 2 source.
</Warning>

## Query Category 2 Emissions

Retrieve all your indirect energy emissions for reporting:

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Get Category 2 emissions summary
response = requests.get(
    f"https://api.dcycle.io/v1/organizations/{os.getenv('DCYCLE_ORG_ID')}/emissions",
    headers=headers,
    params={
        "year": 2024,
        "category": "indirect_energy",  # ISO 14064-1 Category 2
    },
).json()

print(f"📊 Category 2: Indirect GHG Emissions from Imported Energy (2024)")
print(f"")
print(f"   LOCATION-BASED METHOD:")
print(f"   Electricity: {response['electricity_location']:,.0f} kg CO₂e")
print(f"   Heat/Steam: {response['heat_location']:,.0f} kg CO₂e")
print(f"   Cooling: {response['cooling_location']:,.0f} kg CO₂e")
print(f"   ─────────────────────────")
print(f"   TOTAL (Location): {response['total_location']:,.0f} kg CO₂e")
print(f"")
print(f"   MARKET-BASED METHOD:")
print(f"   Electricity: {response['electricity_market']:,.0f} kg CO₂e")
print(f"   Heat/Steam: {response['heat_market']:,.0f} kg CO₂e")
print(f"   Cooling: {response['cooling_market']:,.0f} kg CO₂e")
print(f"   ─────────────────────────")
print(f"   TOTAL (Market): {response['total_market']:,.0f} kg CO₂e")
```

## Emission Factors

### Calculation Methods: Location-based vs Market-based

<Tabs>
  <Tab title="Location-based Method">
    The **location-based method** uses average grid emission factors based on where energy is consumed. This reflects the average emissions intensity of the local grid.

    ```
    Facility (any country) → Invoice → Grid EF by Location → CO₂e
          ↓                     ↓              ↓                ↓
      Country from          kWh consumed    Grid emission    Reflects average
      facility address                      factors          grid emissions
    ```

    **Key characteristics:**

    * Uses country/regional grid average emission factors
    * Emission factors from Ecoinvent and REE (Red Eléctrica Española)
    * Updated when new version of Ecoinvent or REE (annually) is released
    * Required for GHG Protocol and ISO 14064-1 compliance

    <AccordionGroup>
      <Accordion title="Emission Factor Sources - Location-based">
        For location-based calculations, Dcycle uses emission factors from:

        * **Ecoinvent** - Global grid emission factors
        * **REE** (Red Eléctrica de España) - Spain-specific factors

        Factors are automatically selected based on:

        * Facility country
        * Invoice year
        * Latest available data version
      </Accordion>

      <Accordion title="Calculation Details - Location-based">
        Location-based emissions are calculated as:

        **CO₂e = Energy Consumed (kWh) × Grid Emission Factor (kg CO₂e/kWh)**

        Where:

        * **Energy Consumed**: Electricity consumption in kWh
        * **Grid EF**: Average emission factor for the country/region grid

        **Example (Non-renewable electricity in Spain, 2024):**

        ```
        10,000 kWh × 0.1 kg CO₂e/kWh = 1,000 kg CO₂e
        ```

        Note: Spain's grid has been decarbonizing rapidly, so emission factors vary significantly by year.
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="Market-based Method">
    The **market-based method** uses emission factors from contractual instruments that convey claims about the emissions attributes of purchased electricity.

    ```
    Facility → Invoice + Supplier → Supplier-specific EF → CO₂e
          ↓           ↓                    ↓                  ↓
      Country     kWh + supplier      Contractual EF      Reflects supplier
                  information                             energy mix
    ```

    **Key characteristics:**

    * Uses supplier-specific emission factors (when available)
    * Reflects actual contractual arrangements
    * Can show zero emissions for 100% renewable suppliers

    <Tip>
      For Spain, Dcycle uses CNMC-published emission factors for each electricity supplier.
    </Tip>

    <AccordionGroup>
      <Accordion title="Emission Factor Sources - Market-based">
        For market-based calculations, Dcycle uses emission factors from:

        * **CNMC** (Spain) - Supplier-specific factors published annually
        * **Supplier certificates** - When provided by the user (custom emission factors)
      </Accordion>

      <Accordion title="Calculation Details - Market-based">
        Market-based emissions are calculated as:

        **CO₂e = Energy Consumed (kWh) × Supplier Emission Factor (kg CO₂e/kWh)**

        Where:

        * **Energy Consumed**: Electricity consumption in kWh
        * **Supplier EF**: Emission factor specific to your electricity supplier

        **Example (100% renewable supplier):**

        ```
        10,000 kWh × 0.00 kg CO₂e/kWh = 0 kg CO₂e
        ```

        Note: Market-based can be higher or lower than location-based depending on your supplier's energy mix.
      </Accordion>
    </AccordionGroup>
  </Tab>
</Tabs>

<Note>
  **Automatic Dual Calculation**

  When you upload an electricity invoice, Dcycle automatically calculates **both** location-based and market-based emissions.
  Both values are stored and available in reports for ISO 14064-1 and GHG Protocol compliance.
</Note>

### District Heating and Cooling Emission Factors

<AccordionGroup>
  <Accordion title="District Heating Emission Factors">
    Sources include:

    * **National district heating associations** - Country averages
    * **Supplier-specific data** - When provided
    * **Default factors** - Based on typical CHP efficiency

    Factors account for the heat source fuel mix.
  </Accordion>

  <Accordion title="District Cooling Emission Factors">
    Calculated based on:

    * **Cooling technology** (absorption, compression)
    * **Coefficient of Performance (COP)**
    * **Electricity emission factor** for electric chillers
  </Accordion>
</AccordionGroup>

## Understanding Your Results

<AccordionGroup>
  <Accordion title="Why Location-based ≠ Market-based?">
    The two values represent different things:

    * **Location-based** reflects the **average grid emissions** where you consume energy
    * **Market-based** reflects **your contractual arrangements** with suppliers

    Common scenarios:

    * **Market > Location**: Your supplier has a higher carbon intensity than the grid average
    * **Market \< Location**: Your supplier uses more renewables than the grid average
    * **Market = 0**: You have 100% renewable electricity contracts
  </Accordion>

  <Accordion title="Reducing Category 2 Emissions">
    Strategies to reduce indirect energy emissions:

    1. **Switch suppliers**: Choose suppliers with lower emission factors
    2. **Purchase green tariffs**: 100% renewable electricity contracts
    3. **Install on-site renewables**: Solar panels, wind (moves to Category 1 or carbon-neutral)
    4. **Energy efficiency**: Reduce overall consumption
    5. **PPAs**: Power Purchase Agreements with renewable generators
  </Accordion>

  <Accordion title="Renewable Energy and Market-based">
    For renewable energy to count as zero emissions in market-based:

    * Must have contractual proof (certificates, PPA, green tariff)
    * Certificate must match consumption location and timing
    * Guarantees of Origin (GOs) or RECs must be retired on your behalf

    Dcycle tracks supplier-reported renewable percentages automatically for supported suppliers.
  </Accordion>
</AccordionGroup>

## Best Practices

<Tip>
  **ISO 14064-1 Category 2 Best Practices**

  1. **Track all facilities**: Include all locations consuming purchased energy
  2. **Monthly data**: Capture consumption monthly for seasonal variation
  3. **Supplier documentation**: Keep certificates for renewable energy claims
  4. **Both methods**: Report location-based AND market-based when possible
  5. **Data quality**: Prefer meter readings over estimates
</Tip>

## Next Steps

<CardGroup cols={2}>
  <Card title="Category 3: Transportation" icon="truck" href="/guides/emissions/iso-14064-category-3-transportation">
    Calculate emissions from transportation activities
  </Card>

  <Card title="Back to ISO 14064 Tutorial" icon="arrow-left" href="/guides/emissions/iso-14064-tutorial">
    Return to the main ISO 14064 tutorial
  </Card>
</CardGroup>
