> ## 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 3: Transportation Emissions

> Quantify indirect GHG emissions from transportation of materials, products, waste, and people

## Understanding Transportation Emissions

**Category 3** under ISO 14064-1 covers indirect GHG emissions from transportation not covered in Categories 1 or 2. This includes transportation of materials, products, waste, employees, and business travelers using vehicles NOT owned or controlled by your organization.

```
┌─────────────────────────────────────────────────────────────────────────────────┐
│              CATEGORY 3: INDIRECT GHG EMISSIONS FROM TRANSPORTATION             │
├─────────────────────────────────────────────────────────────────────────────────┤
│                                                                                 │
│  ┌─────────────────────┐  ┌─────────────────────┐  ┌─────────────────────────┐  │
│  │ BUSINESS TRAVEL     │  │ EMPLOYEE            │  │ FREIGHT                 │  │
│  │                     │  │ COMMUTING           │  │ TRANSPORTATION          │  │
│  ├─────────────────────┤  ├─────────────────────┤  ├─────────────────────────┤  │
│  │ • Flights           │  │ • Car commutes      │  │ • Upstream (inbound)    │  │
│  │ • Rail travel       │  │ • Public transit    │  │ • Downstream (outbound) │  │
│  │ • Car rentals       │  │ • Cycling/walking   │  │ • Third-party logistics │  │
│  │ • Taxi/rideshare    │  │ • Remote work       │  │ • Waste transport       │  │
│  │ • Hotel stays       │  │                     │  │                         │  │
│  └─────────────────────┘  └─────────────────────┘  └─────────────────────────┘  │
│                                                                                 │
│                Transportation NOT owned/controlled by your organization         │
│                                                                                 │
└─────────────────────────────────────────────────────────────────────────────────┘
```

<Note>
  **Transportation Emission Formula**

  **Transport Emissions = Distance × Emission Factor**

  Or with weight:

  **Freight Emissions = Distance × Weight × Emission Factor (per tonne-km)**

  Where emission factors vary by transport mode, vehicle type, and load factor.
</Note>

## Prerequisites

Before starting, ensure you have:

* Dcycle API credentials ([get them here](/docs/quickstart#step-1-get-your-api-key))
* Travel records (bookings, expense reports, travel agency data)
* Employee commuting survey data or estimates
* Freight shipment records (origin, destination, weight)

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

  Track transportation emissions through our web interface:

  * [Business Travels](https://app.dcycle.io/business-travels) - Log business trips
  * [Employees](https://app.dcycle.io/employees) - Track commuting patterns
</Tip>

## Data Map: Category 3 Requirements

```
┌─────────────────────────────────────────────────────────────────────────────────────────┐
│                      CATEGORY 3 DATA REQUIREMENTS                                       │
├─────────────────────────────────────────────────────────────────────────────────────────┤
│                                                                                         │
│  ┌─────────────────────────────────────────────────────────────────────────────────┐   │
│  │ BUSINESS TRAVEL                                                                 │   │
│  ├─────────────────────────────────────────────────────────────────────────────────┤   │
│  │                                                                                 │   │
│  │  Flight Data            Ground Transport        Accommodation                   │   │
│  │  ───────────            ────────────────        ─────────────                   │   │
│  │  • Origin airport       • Mode (rail/car)       • Hotel nights                  │   │
│  │  • Destination airport  • Distance              • Location/country              │   │
│  │  • Travel class         • Vehicle type          • Hotel type                    │   │
│  │  • Round trip?                                                                  │   │
│  │                                                                                 │   │
│  └─────────────────────────────────────────────────────────────────────────────────┘   │
│                                                                                         │
│  ┌─────────────────────────────────────────────────────────────────────────────────┐   │
│  │ EMPLOYEE COMMUTING                                                              │   │
│  ├─────────────────────────────────────────────────────────────────────────────────┤   │
│  │                                                                                 │   │
│  │  Employee Info          Commute Details         Work Pattern                    │   │
│  │  ─────────────          ──────────────          ────────────                    │   │
│  │  • Employee ID          • Transport mode        • Days per week in office       │   │
│  │  • Work location        • Distance (one way)    • Remote work days              │   │
│  │  • Home location        • Vehicle type          • Period (start/end)            │   │
│  │                                                                                 │   │
│  └─────────────────────────────────────────────────────────────────────────────────┘   │
│                                                                                         │
│  ┌─────────────────────────────────────────────────────────────────────────────────┐   │
│  │ FREIGHT TRANSPORTATION                                                          │   │
│  ├─────────────────────────────────────────────────────────────────────────────────┤   │
│  │                                                                                 │   │
│  │  Shipment Details       Transport Mode          Load Information                │   │
│  │  ────────────────       ──────────────          ────────────────                │   │
│  │  • Origin location      • Road/Rail/Sea/Air     • Weight (tonnes)               │   │
│  │  • Destination          • Vehicle type          • Volume (m³)                   │   │
│  │  • Distance             • Carrier details       • Product category              │   │
│  │                                                                                 │   │
│  └─────────────────────────────────────────────────────────────────────────────────┘   │
│                                                                                         │
└─────────────────────────────────────────────────────────────────────────────────────────┘
```

## Business Travel

Track emissions from employee business trips including flights, ground transportation, and hotel stays.

### Record Flight Travel

<Accordion title="📋 Data Map: Flight Travel">
  | Field              | Type   | Required | Description                                                  | Example                          |
  | ------------------ | ------ | -------- | ------------------------------------------------------------ | -------------------------------- |
  | `transport_type`   | string | ✅        | Type of transport                                            | `"aircraft"`                     |
  | `origin`           | string | ✅\*      | Origin airport code (IATA)                                   | `"MAD"`                          |
  | `destination`      | string | ✅\*      | Destination airport code (IATA)                              | `"LHR"`                          |
  | `distance_km`      | number | ✅\*      | Distance in km (\*either origin+destination OR distance\_km) | `1264`                           |
  | `start_date`       | date   | ✅        | Travel start date                                            | `"2024-03-15"`                   |
  | `end_date`         | date   | ✅        | Travel end date                                              | `"2024-03-15"`                   |
  | `travel_type`      | string | ❌        | One-way or round trip                                        | `"one_way"`, `"round"`           |
  | `travel_number`    | int    | ❌        | Number of trips (defaults to 1)                              | `1`                              |
  | `renewable_energy` | string | ❌        | Uses renewable energy?                                       | `"yes"`, `"no"`, `"do_not_know"` |
  | `name`             | string | ❌        | Employee name                                                | `"John Smith"`                   |
  | `email`            | string | ❌        | Employee email                                               | `"john@company.com"`             |

  **Where to get this data:**

  * **Travel bookings**: Corporate travel systems, travel agencies
  * **Expense reports**: Employee expense claims
  * **Airport codes**: IATA 3-letter codes (e.g., MAD, LHR, JFK)

  <Note>
    **Distance or Locations Required**

    You must provide either `distance_km` OR both `origin` and `destination`. If you provide airport codes, Dcycle automatically calculates the distance.
  </Note>
</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 a business flight
  flight_data = {
      "transport_type": "aircraft",
      "origin": "MAD",  # Madrid (IATA code)
      "destination": "LHR",  # London Heathrow (IATA code)
      "travel_type": "round",  # round or one_way
      "start_date": "2024-03-15",
      "end_date": "2024-03-15",
  }

  response = requests.post(
      "https://api.dcycle.io/v1/business-travels",
      headers=headers,
      json=flight_data,
  )

  travel = response.json()
  print(f"✅ Business flight recorded: {travel['id']}")
  print(f"   Route: {flight_data['origin']} → {flight_data['destination']}")
  print(f"   Distance: {travel['distance_km']} km")
  print(f"   CO₂e: {travel['co2e']} kg")
  print(f"   ISO 14064-1 Category: 3 (Transportation)")
  ```

  ```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 a business flight
  const flightData = {
    transport_type: 'aircraft',
    origin: 'MAD',  // Madrid (IATA code)
    destination: 'LHR',  // London Heathrow (IATA code)
    travel_type: 'round',  // round or one_way
    start_date: '2024-03-15',
    end_date: '2024-03-15',
  };

  const response = await axios.post(
    'https://api.dcycle.io/v1/business-travels',
    flightData,
    { headers }
  );

  const travel = response.data;
  console.log(`✅ Business flight recorded: ${travel.id}`);
  console.log(`   Route: ${flightData.origin} → ${flightData.destination}`);
  console.log(`   Distance: ${travel.distance_km} km`);
  console.log(`   CO₂e: ${travel.co2e} kg`);
  console.log(`   ISO 14064-1 Category: 3 (Transportation)`);
  ```
</CodeGroup>

<Note>
  **Automatic Distance Calculation**

  When you provide information for origin and destination, Dcycle automatically:

  * Calculates the flight distance
  * Determines the aircraft size category (very short, short, medium, long haul) based on Ecoinvent classification
  * Applies the appropriate emission factor from Ecoinvent
</Note>

### Record Rail Travel

<Accordion title="📋 Data Map: Rail Travel">
  | Field              | Type   | Required | Description                                                  | Example                          |
  | ------------------ | ------ | -------- | ------------------------------------------------------------ | -------------------------------- |
  | `transport_type`   | string | ✅        | Type of transport                                            | `"train"`                        |
  | `origin`           | string | ✅\*      | Origin city/station                                          | `"Madrid"`                       |
  | `destination`      | string | ✅\*      | Destination city/station                                     | `"Barcelona"`                    |
  | `distance_km`      | number | ✅\*      | Distance in km (\*either origin+destination OR distance\_km) | `620`                            |
  | `start_date`       | date   | ✅        | Travel start date                                            | `"2024-04-10"`                   |
  | `end_date`         | date   | ✅        | Travel end date                                              | `"2024-04-10"`                   |
  | `travel_type`      | string | ❌        | One-way or round trip                                        | `"one_way"`, `"round"`           |
  | `travel_number`    | int    | ❌        | Number of trips                                              | `1`                              |
  | `renewable_energy` | string | ❌        | Train uses renewable energy?                                 | `"yes"`, `"no"`, `"do_not_know"` |
</Accordion>

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Record rail travel
rail_data = {
    "transport_type": "train",
    "origin": "Madrid",
    "destination": "Barcelona",
    "travel_type": "round",
    "start_date": "2024-04-10",
    "end_date": "2024-04-10",
    "renewable_energy": "do_not_know",
}

response = requests.post(
    "https://api.dcycle.io/v1/business-travels",
    headers=headers,
    json=rail_data,
)

travel = response.json()
print(f"✅ Rail travel recorded: {travel['id']}")
print(f"   CO₂e: {travel['co2e']} kg")
print(f"   (Rail typically 80-90% lower emissions than flying)")
```

### Record Car Rental / Ground Transport

<Accordion title="📋 Data Map: Car Travel">
  | Field            | Type   | Required | Description                                                  | Example                                                   |
  | ---------------- | ------ | -------- | ------------------------------------------------------------ | --------------------------------------------------------- |
  | `transport_type` | string | ✅        | Type of transport                                            | `"car"`                                                   |
  | `origin`         | string | ✅\*      | Origin location                                              | `"Madrid"`                                                |
  | `destination`    | string | ✅\*      | Destination location                                         | `"Toledo"`                                                |
  | `distance_km`    | number | ✅\*      | Distance in km (\*either origin+destination OR distance\_km) | `350`                                                     |
  | `vehicle_size`   | string | ✅        | Vehicle size (required for car)                              | `"small"`, `"medium"`, `"large"`                          |
  | `fuel_type`      | string | ✅        | Fuel type (required for car)                                 | `"diesel"`, `"petrol"`, `"electric"`, `"hybrid"`, `"lpg"` |
  | `start_date`     | date   | ✅        | Travel start date                                            | `"2024-05-20"`                                            |
  | `end_date`       | date   | ✅        | Travel end date                                              | `"2024-05-20"`                                            |
  | `travel_type`    | string | ❌        | One-way or round trip                                        | `"one_way"`, `"round"`                                    |
  | `travel_number`  | int    | ❌        | Number of trips                                              | `1`                                                       |
</Accordion>

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Record car rental
car_rental_data = {
    "transport_type": "car",
    "vehicle_size": "medium",
    "fuel_type": "diesel",
    "distance_km": 350,
    "start_date": "2024-05-20",
    "end_date": "2024-05-20",
}

response = requests.post(
    "https://api.dcycle.io/v1/business-travels",
    headers=headers,
    json=car_rental_data,
)

travel = response.json()
print(f"✅ Car travel recorded: {travel['id']}")
print(f"   Distance: {travel['distance_km']} km")
print(f"   CO₂e: {travel['co2e']} kg")
```

## Employee Commuting

**Employee commuting** covers emissions from the transportation of employees between their homes and worksites in vehicles not owned or operated by your organization. This includes:

* **Daily commuting**: Regular home-to-work travel
* **All transport modes**: Car, public transit, cycling, walking
* **Remote work**: Zero emissions for work-from-home days
* **Carpooling**: Shared vehicle emissions (divided among passengers)

```
┌─────────────────────────────────────────────────────────────────────────────┐
│              ISO 14064-1 CATEGORY 3: Employee Commuting                     │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│  EMPLOYEE HOMES                               WORKPLACE                     │
│  ──────────────────                           ──────────                    │
│                                                                             │
│  ┌──────────────┐                            ┌──────────────┐               │
│  │   Home       │◄─── Car ──────────────►    │   Office     │               │
│  └──────────────┘                            │              │               │
│                                              │              │               │
│  ┌──────────────┐                            │              │               │
│  │   Home       │◄─── Train ────────────►    │              │               │
│  └──────────────┘                            │              │               │
│                                              │              │               │
│  ┌──────────────┐                            │              │               │
│  │   Home       │◄─── Bus ──────────────►    │              │               │
│  └──────────────┘                            │              │               │
│                                              │              │               │
│  ┌──────────────┐                            │              │               │
│  │   Home       │◄─── Bike ─────────────►    │              │               │
│  └──────────────┘                            │              │               │
│                                              │              │               │
│  ┌──────────────┐                            │              │               │
│  │   Home       │──── Remote ───────────     │   (0 km)     │               │
│  └──────────────┘                            └──────────────┘               │
│                                                                             │
│  DAILY ROUND TRIP:                                                          │
│  • Distance (km) × 2 (round trip)                                           │
│  • × Working days per week                                                  │
│  • × Emission factor (by transport mode)                                    │
│                                                                             │
│  INCLUDED:                             NOT INCLUDED:                        │
│  • Daily commute                       • Business travel (separate)         │
│  • All transport modes                 • Company vehicles (Category 1)      │
│  • Remote work tracking                • Customer/visitor travel            │
│  • Carpooling emissions                                                     │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘
```

<Note>
  **Employee Commuting vs Business Travel**

  * **Employee Commuting**: Daily travel between home and work
  * **Business Travel**: Trips for business purposes (meetings, conferences, site visits)
</Note>

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

  You can track employee commuting through our web interface:

  * [Send employee surveys](https://scribehow.com/shared/How_to_send_a_commuting_survey__fZX-d-N7QKO34L_6QR1RIg) ([ES](https://scribehow.com/shared/Como_enviar_una_encuesta_de_desplazamientos__V2_xj17hRVWqCfU_BKMHIQ)) - Collect data via email
  * Manual entry for individual employees
  * CSV bulk upload for HR data
</Tip>

### Data Map: Employee Commuting Overview

```
┌─────────────────────────────────────────────────────────────────────────────────────────┐
│                   EMPLOYEE COMMUTING DATA REQUIREMENTS OVERVIEW                          │
├─────────────────────────────────────────────────────────────────────────────────────────┤
│                                                                                         │
│  ┌─────────────────────────────────────────────────────────────────────────────────┐   │
│  │ EMPLOYEE RECORD                                                                 │   │
│  ├─────────────────────────────────────────────────────────────────────────────────┤   │
│  │                                                                                 │   │
│  │  Required Fields              Optional Fields                                   │   │
│  │  ──────────────────           ──────────────────                                │   │
│  │  • origin OR total_km         • email                                           │   │
│  │  • destination OR total_km    • name                                            │   │
│  │  • transport_type             • vehicle_size                                    │   │
│  │  • weekly_travels             • fuel_type                                       │   │
│  │                               • renewable_energy                                │   │
│  │                               • carpool (true/false)                            │   │
│  │                                                                                 │   │
│  └─────────────────────────────────────────────────────────────────────────────────┘   │
│                                                                                         │
│  ┌─────────────────────────────────────────────────────────────────────────────────┐   │
│  │ COMMUTING PERIOD (Employee Historic)                                            │   │
│  ├─────────────────────────────────────────────────────────────────────────────────┤   │
│  │                                                                                 │   │
│  │  Required Fields              Optional Fields                                   │   │
│  │  ──────────────────           ──────────────────                                │   │
│  │  • commuting_type             • situation                                       │   │
│  │    ("in_itinere")                                                               │   │
│  │  • start_date                                                                   │   │
│  │  • end_date                                                                     │   │
│  │  • daily_trips (default: 1)                                                     │   │
│  │                                                                                 │   │
│  └─────────────────────────────────────────────────────────────────────────────────┘   │
│                                                                                         │
│  ┌─────────────────────────────────────────────────────────────────────────────────┐   │
│  │ CALCULATION FLOW                                                                │   │
│  ├─────────────────────────────────────────────────────────────────────────────────┤   │
│  │                                                                                 │   │
│  │  Origin + Destination ──► Distance (km) [one-way]                               │   │
│  │                                │                                                │   │
│  │  Weekly Travels ──────────────┼──► Working days in period                       │   │
│  │                               │                                                 │   │
│  │  Transport Type ──────────────┼──► Emission Factor (kg CO₂e/km)                 │   │
│  │                               │                                                 │   │
│  │  CO₂e = Distance × Days × Daily_Trips × EF × 2 (round trip)                     │   │
│  │                                                                                 │   │
│  │  If carpool: CO₂e ÷ 3 (carpool factor)                                          │   │
│  │                                                                                 │   │
│  └─────────────────────────────────────────────────────────────────────────────────┘   │
│                                                                                         │
└─────────────────────────────────────────────────────────────────────────────────────────┘
```

### Weekly Travels (Working Days)

The `weekly_travels` field defines which days of the week the employee commutes:

| Day       | Value | Description                  |
| --------- | ----- | ---------------------------- |
| Monday    | `0`   | Included if present in array |
| Tuesday   | `1`   | Included if present in array |
| Wednesday | `2`   | Included if present in array |
| Thursday  | `3`   | Included if present in array |
| Friday    | `4`   | Included if present in array |
| Saturday  | `5`   | Included if present in array |
| Sunday    | `6`   | Included if present in array |

**Examples:**

| Pattern             | `weekly_travels`  | Description            |
| ------------------- | ----------------- | ---------------------- |
| Full week (Mon-Fri) | `[0, 1, 2, 3, 4]` | Traditional 5-day week |
| 3 days/week         | `[0, 2, 4]`       | Mon, Wed, Fri only     |
| Hybrid (2 days)     | `[1, 3]`          | Tue, Thu in office     |
| Full remote         | `[]`              | Empty = no commuting   |

<Note>
  **Remote Work / Telework**

  Set `weekly_travels: []` (empty array) for fully remote employees. Dcycle will calculate zero commuting emissions for these employees.
</Note>

### Transport Types

| Transport Type | Description      | Typical EF Range     |
| -------------- | ---------------- | -------------------- |
| `car`          | Personal vehicle | 0.1-0.2 kg CO₂e/km   |
| `bus`          | Public bus       | 0.05-0.1 kg CO₂e/km  |
| `train`        | Commuter rail    | 0.03-0.05 kg CO₂e/km |
| `metro`        | Urban subway     | 0.02-0.04 kg CO₂e/km |
| `trolleybus`   | Electric trolley | 0.02-0.04 kg CO₂e/km |
| `motorbike`    | Motorcycle       | 0.08-0.12 kg CO₂e/km |
| `bicycle`      | Cycling          | 0 kg CO₂e/km         |
| `walk`         | Walking          | 0 kg CO₂e/km         |

**Vehicle options for cars:**

| Vehicle Size | Fuel Type                                                      | Description  |
| ------------ | -------------------------------------------------------------- | ------------ |
| `small`      | `petrol`, `diesel`, `electric`, `hybrid`, `lpg`, `natural_gas` | Compact cars |
| `medium`     | `petrol`, `diesel`, `electric`, `hybrid`, `lpg`, `natural_gas` | Sedans       |
| `large`      | `petrol`, `diesel`, `electric`, `hybrid`, `lpg`, `natural_gas` | SUVs         |

<Note>
  **Carpooling**

  When `carpool: true`, emissions are divided by 3 (average carpool occupancy). This encourages shared transportation and accurately reflects the lower per-person emissions.
</Note>

### Step 1: Create Employee Records

<Accordion title="📋 Data Map: Employee Record">
  | Field            | Type    | Required | Description           | Example                |
  | ---------------- | ------- | -------- | --------------------- | ---------------------- |
  | `origin`         | string  | ⚠️       | Home address/city     | `"Madrid, Spain"`      |
  | `destination`    | string  | ⚠️       | Office address        | `"Company HQ, Madrid"` |
  | `total_km`       | number  | ⚠️       | One-way distance      | `15`                   |
  | `transport_type` | string  | ✅        | Commute mode          | `"car"`                |
  | `weekly_travels` | array   | ✅        | Days in office \[0-6] | `[0, 1, 2, 3, 4]`      |
  | `email`          | string  | ❌        | Employee email        | `"john@company.com"`   |
  | `name`           | string  | ❌        | Employee name         | `"John Smith"`         |
  | `vehicle_size`   | string  | ❌        | For cars              | `"medium"`             |
  | `fuel_type`      | string  | ❌        | For cars              | `"petrol"`             |
  | `carpool`        | boolean | ❌        | Shared vehicle        | `false`                |

  ⚠️ **Conditional requirements:**

  * Either `origin` + `destination` OR `total_km` must be provided

  **Where to get this data:**

  * **Home location**: HR records, employee surveys
  * **Transport mode**: Employee surveys
  * **Working days**: HR/scheduling systems
</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"),
  }

  # Example: Employee commuting by car (5 days/week)
  employee = {
      "email": "john.smith@company.com",
      "name": "John Smith",
      "origin": "Residential Area, Madrid",
      "destination": "Company HQ, Madrid Business District",
      "transport_type": "car",
      "vehicle_size": "medium",
      "fuel_type": "petrol",
      "weekly_travels": [0, 1, 2, 3, 4],  # Mon-Fri
      "carpool": False,
  }

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

  print(f"✅ Employee created")
  print(f"   ID: {response['id']}")
  print(f"   Email: {employee['email']}")
  print(f"   Commute: {employee['origin']} → {employee['destination']}")
  print(f"   Transport: {employee['transport_type']}")
  print(f"   Days/week: {len(employee['weekly_travels'])}")

  # Create commuting period
  employee_id = response['id']

  commuting_period = {
      "employee_id": employee_id,
      "commuting_type": "in_itinere",  # Home-work commute
      "start_date": "2024-01-01",
      "end_date": "2024-12-31",
      "daily_trips": 1,  # 1 round trip per day
      "origin": employee['origin'],
      "destination": employee['destination'],
      "total_km": 15,  # One-way distance
      "transport_type": employee['transport_type'],
      "vehicle_size": employee.get('vehicle_size'),
      "fuel_type": employee.get('fuel_type'),
      "weekly_travels": employee['weekly_travels'],
      "carpool": employee.get('carpool', False),
  }

  period_response = requests.post(
      "https://api.dcycle.io/v1/employees_historic",
      headers=headers,
      json=commuting_period
  ).json()

  print(f"   Period: {commuting_period['start_date']} to {commuting_period['end_date']}")
  print(f"   Distance: {commuting_period['total_km']} km (one-way)")
  print(f"   CO₂e: {period_response.get('co2e', 'Calculating...')} kg")
  print(f"   ISO 14064-1 Category: 3 (Transportation)")
  ```

  ```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
  };

  // Example: Employee commuting by car (5 days/week)
  const employee = {
    email: 'john.smith@company.com',
    name: 'John Smith',
    origin: 'Residential Area, Madrid',
    destination: 'Company HQ, Madrid Business District',
    transport_type: 'car',
    vehicle_size: 'medium',
    fuel_type: 'petrol',
    weekly_travels: [0, 1, 2, 3, 4],
    carpool: false
  };

  const response = await axios.post(
    'https://api.dcycle.io/v1/employees',
    employee,
    { headers }
  ).then(res => res.data);

  console.log('✅ Employee created');
  console.log(`   ID: ${response.id}`);
  console.log(`   Email: ${employee.email}`);
  console.log(`   Transport: ${employee.transport_type}`);
  console.log(`   Days/week: ${employee.weekly_travels.length}`);
  console.log(`   ISO 14064-1 Category: 3 (Transportation)`);
  ```
</CodeGroup>

### Common Commuting Scenarios

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Example employees with different commuting patterns

employees = [
    # Full-time office worker (car)
    {
        "email": "alice@company.com",
        "name": "Alice Johnson",
        "total_km": 20,
        "transport_type": "car",
        "vehicle_size": "medium",
        "fuel_type": "diesel",
        "weekly_travels": [0, 1, 2, 3, 4],
        "carpool": False,
    },
    # Hybrid worker (public transit, 3 days)
    {
        "email": "bob@company.com",
        "name": "Bob Williams",
        "total_km": 12,
        "transport_type": "train",
        "weekly_travels": [1, 2, 3],  # Tue, Wed, Thu
        "carpool": False,
    },
    # Eco-commuter (bike)
    {
        "email": "carol@company.com",
        "name": "Carol Davis",
        "total_km": 5,
        "transport_type": "bicycle",
        "weekly_travels": [0, 1, 2, 3, 4],
        "carpool": False,
    },
    # Remote worker
    {
        "email": "david@company.com",
        "name": "David Brown",
        "total_km": 0,
        "transport_type": "walk",  # Placeholder
        "weekly_travels": [],  # Fully remote
        "carpool": False,
    },
    # Carpooler
    {
        "email": "emma@company.com",
        "name": "Emma Wilson",
        "total_km": 25,
        "transport_type": "car",
        "vehicle_size": "large",
        "fuel_type": "petrol",
        "weekly_travels": [0, 1, 2, 3, 4],
        "carpool": True,  # Shares ride with colleagues
    },
    # Electric car commuter
    {
        "email": "frank@company.com",
        "name": "Frank Miller",
        "total_km": 30,
        "transport_type": "car",
        "vehicle_size": "medium",
        "fuel_type": "electric",
        "weekly_travels": [0, 1, 2, 3, 4],
        "carpool": False,
    },
]

# Create all employees
for emp in employees:
    response = requests.post(
        "https://api.dcycle.io/v1/employees",
        headers=headers,
        json=emp
    ).json()
    
    days = len(emp['weekly_travels'])
    remote = " (Remote)" if days == 0 else ""
    carpool = " [Carpool]" if emp.get('carpool') else ""
    
    print(f"   {emp['name']}: {emp['transport_type']} | {days} days/week{remote}{carpool}")
    print(f"      Distance: {emp['total_km']} km | CO₂e: {response.get('co2e', 'TBD')} kg/year")

print(f"\n✅ Created {len(employees)} employee records")
```

### Step 2: Send Employee Surveys

Collect commuting data directly from employees via survey:

```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"),
}

# Send survey to employees
survey_request = {
    "emails": [
        "alice@company.com",
        "bob@company.com",
        "carol@company.com",
    ],
    "survey_type": "commuting",
    "message": "Please complete this short survey about your daily commute.",
}

response = requests.post(
    "https://api.dcycle.io/v1/employees/survey",
    headers=headers,
    json=survey_request
)

if response.status_code == 200:
    print(f"✅ Survey sent to {len(survey_request['emails'])} employees")
else:
    print(f"❌ Failed: {response.text}")
```

<Note>
  **Survey Questions**

  Dcycle's commuting survey asks employees:

  * Home location (address or postal code)
  * Primary transport mode
  * Vehicle details (if car)
  * Days worked in office per week
  * Carpooling (yes/no)
</Note>

### Step 3: Bulk Upload Employee Data

For organizations with many employees, use CSV upload:

#### CSV Format

```csv theme={"theme":{"light":"github-light","dark":"github-dark"}}
email,name,origin,destination,total_km,transport_type,vehicle_size,fuel_type,weekly_travels,carpool
alice@company.com,"Alice Johnson",,,20,car,medium,diesel,"[0,1,2,3,4]",false
bob@company.com,"Bob Williams",,,12,train,,,"[1,2,3]",false
carol@company.com,"Carol Davis",,,5,bicycle,,,"[0,1,2,3,4]",false
david@company.com,"David Brown",,,0,walk,,,"[]",false
emma@company.com,"Emma Wilson",,,25,car,large,petrol,"[0,1,2,3,4]",true
frank@company.com,"Frank Miller",,,30,car,medium,electric,"[0,1,2,3,4]",false
```

<Note>
  **CSV Notes:**

  * `total_km` is one-way distance (home to office)
  * `weekly_travels` use format `"[0,1,2,3,4]"` (JSON array as string)
  * Empty `"[]"` for remote workers
  * `carpool`: `true` or `false`
</Note>

#### Upload CSV

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

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

# Upload CSV file
with open("employee_commuting.csv", "rb") as f:
    files = {"file": ("employee_commuting.csv", f, "text/csv")}
    
    response = requests.post(
        "https://api.dcycle.io/v1/employees/bulk/csv",
        headers=headers,
        files=files
    )

if response.status_code == 200:
    result = response.json()
    print(f"✅ Uploaded {result.get('records_processed', 0)} employee records")
else:
    print(f"❌ Upload failed: {response.text}")
```

### Commuting Reduction Strategies

<Tip>
  **Reduction Strategies for Employee Commuting**

  1. **Remote work policy**: Allow 2+ days WFH per week
  2. **Public transit subsidies**: Incentivize train/bus use
  3. **Cycle-to-work schemes**: Provide bike facilities and subsidies
  4. **Carpooling programs**: Connect employees on similar routes
  5. **Electric vehicle charging**: Install workplace chargers
  6. **Shuttle services**: Provide company buses for major routes
  7. **Flexible hours**: Avoid peak traffic (lower congestion emissions)
</Tip>

## Upstream Transportation

Track emissions from inbound freight - materials and products shipped TO your organization.

<Accordion title="📋 Data Map: Upstream Freight">
  | Field            | Type   | Required | Description                 | Example                              |
  | ---------------- | ------ | -------- | --------------------------- | ------------------------------------ |
  | `direction`      | string | ✅        | Upstream or downstream      | `"upstream"`                         |
  | `origin`         | string | ✅        | Origin location             | `"Shanghai, China"`                  |
  | `destination`    | string | ✅        | Destination (your facility) | `"Madrid, Spain"`                    |
  | `transport_mode` | string | ✅        | Mode of transport           | `"sea"`, `"road"`, `"rail"`, `"air"` |
  | `weight_tonnes`  | number | ✅        | Shipment weight             | `25`                                 |
  | `date`           | date   | ✅        | Shipment date               | `"2024-02-15"`                       |

  **Where to get this data:**

  * **Shipment details**: Supplier invoices, shipping documents
  * **Weight**: Bill of lading, packing lists
  * **Origin**: Supplier locations
</Accordion>

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Record upstream freight shipment
upstream_freight = {
    "direction": "upstream",
    "origin": "Shanghai, China",
    "destination": "Madrid, Spain",
    "transport_mode": "sea",
    "weight_tonnes": 25,
    "date": "2024-02-15",
}

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

shipment = response.json()
print(f"✅ Upstream freight recorded: {shipment['id']}")
print(f"   Route: {upstream_freight['origin']} → {upstream_freight['destination']}")
print(f"   Mode: {upstream_freight['transport_mode']}")
print(f"   Weight: {upstream_freight['weight_tonnes']} tonnes")
print(f"   CO₂e: {shipment['co2e']} kg")
print(f"   ISO 14064-1 Category: 3 (Transportation)")
```

## Downstream Transportation

Track emissions from outbound freight - products shipped FROM your organization to customers.

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Record downstream freight shipment
downstream_freight = {
    "direction": "downstream",
    "origin": "Madrid, Spain",
    "destination": "Paris, France",
    "transport_mode": "road",
    "vehicle_type": "truck_40t",
    "weight_tonnes": 15,
    "date": "2024-03-20",
}

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

shipment = response.json()
print(f"✅ Downstream freight recorded: {shipment['id']}")
print(f"   Route: {downstream_freight['origin']} → {downstream_freight['destination']}")
print(f"   CO₂e: {shipment['co2e']} kg")
print(f"   ISO 14064-1 Category: 3 (Transportation)")
```

<Note>
  **Upstream vs Downstream Classification**

  * **Upstream**: Inbound goods, raw materials from suppliers, waste sent for treatment
  * **Downstream**: Outbound products to customers, deliveries to distribution centers

  Both are Category 3 under ISO 14064-1, but tracking separately helps identify reduction opportunities.
</Note>

## Query Category 3 Emissions

Retrieve all your transportation emissions for reporting:

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

print(f"📊 Category 3: Indirect GHG Emissions from Transportation (2024)")
print(f"")
print(f"   Business Travel:")
print(f"   - Flights: {response['flights']:,.0f} kg CO₂e")
print(f"   - Rail: {response['rail']:,.0f} kg CO₂e")
print(f"   - Car/Ground: {response['ground']:,.0f} kg CO₂e")
print(f"   - Hotels: {response['hotels']:,.0f} kg CO₂e")
print(f"")
print(f"   Employee Commuting: {response['commuting']:,.0f} kg CO₂e")
print(f"")
print(f"   Freight:")
print(f"   - Upstream: {response['upstream_freight']:,.0f} kg CO₂e")
print(f"   - Downstream: {response['downstream_freight']:,.0f} kg CO₂e")
print(f"")
print(f"   ─────────────────────────")
print(f"   TOTAL CATEGORY 3: {response['total']:,.0f} kg CO₂e")
```

## Emission Factors

Dcycle uses emission factors from **Ecoinvent 3.8 cutoff by classification** for all Category 3 transportation calculations. Factors are automatically selected based on transport type, distance, vehicle characteristics, and regional variations.

### Business Travel (Flights)

<AccordionGroup>
  <Accordion title="Emission Factor Sources">
    For aircraft travel, emission factors are selected based on:

    * **Aircraft size category** (very short, short, medium, long haul - determined by distance following Ecoinvent classification)
    * **Origin location** (regional adjustments)
    * **Transport type** (aircraft)
    * **Renewable energy** (if applicable)
  </Accordion>

  <Accordion title="Aircraft Size Categories">
    Dcycle automatically determines the aircraft size based on flight distance:

    | Distance (km) | Aircraft Size | Description                        |
    | ------------- | ------------- | ---------------------------------- |
    | 0 - 800       | `very_short`  | Regional/domestic flights          |
    | 800 - 1,500   | `short`       | Short-haul flights                 |
    | 1,500 - 4,000 | `medium`      | Medium-haul flights                |
    | 4,000+        | `long`        | Long-haul intercontinental flights |

    These distance thresholds are defined by Ecoinvent documentation for passenger air transport.

    **Note:** Cabin class (economy, business, first) is NOT used in calculations. Dcycle calculates emissions based on average passenger emissions per km for each aircraft size category from Ecoinvent.
  </Accordion>

  <Accordion title="Calculation Details">
    Business travel flight emissions are calculated as:

    **CO₂e = Distance (km) × Emission Factor (kg CO₂e/passenger-km) × Trip Multiplier**

    Where:

    * **Distance**: Calculated from IATA codes or provided directly
    * **Emission Factor**: Based on aircraft size category (from Ecoinvent)
    * **Trip Multiplier**: 2x for round trips, 1x for one-way

    **Example (Madrid to London round trip):**

    ```
    Distance: 1,264 km (calculated from MAD → LHR)
    Aircraft Size: short (800-1,500 km range per Ecoinvent classification)
    EF: 0.255 kg CO₂e/passenger-km (Ecoinvent 3.8)
    Trip: round (2x)

    CO₂e = 1,264 × 0.255 × 2 = 645 kg CO₂e
    ```
  </Accordion>
</AccordionGroup>

### Ground Transportation (Car & Rail)

<AccordionGroup>
  <Accordion title="Car Travel Emission Factors">
    For car travel (business travel and commuting), emission factors depend on:

    * **Vehicle size**: small, medium, large
    * **Fuel type**: diesel, petrol, electric, hybrid, LPG, natural gas

    **Calculation:**

    **CO₂e = Distance (km) × Emission Factor (kg CO₂e/km)**

    Where emission factors are specific to the vehicle size and fuel type combination from Ecoinvent.
  </Accordion>

  <Accordion title="Rail Travel Emission Factors">
    For rail travel, emission factors depend on:

    * **Origin location** (regional grid factors for electric trains)
    * **Renewable energy** (yes, no, don't know)

    Rail typically produces 80-90% lower emissions than flying for the same distance.
  </Accordion>
</AccordionGroup>

### Employee Commuting

<AccordionGroup>
  <Accordion title="Emission Factor Sources">
    **Ecoinvent 3.8+ Cut-off**

    * Lifecycle emission factors by transport mode
    * Regional variations where available
    * Covers cars, public transit, and active transport
    * Well-to-Wheel (WTW) factors including fuel production
  </Accordion>

  <Accordion title="Distance Calculation">
    When origin/destination are provided, distance is calculated using routing services. If geocoding fails or locations are unavailable, use `total_km` directly.
  </Accordion>

  <Accordion title="Calculation Details">
    Employee commuting emissions are calculated as:

    **CO₂e = Distance (km) × Days × Daily\_Trips × Emission Factor × 2 (round trip)**

    Where:

    * **Distance**: One-way distance from home to office
    * **Days**: Number of working days in the period (based on `weekly_travels`)
    * **Daily\_Trips**: Number of trips per day (default: 1)
    * **Emission Factor**: Based on transport type from Ecoinvent

    If `carpool: true`, the result is divided by 3 (average carpool occupancy).

    **Example (Car commute, 5 days/week):**

    ```
    Distance: 15 km (one-way)
    Transport: car (medium, petrol)
    Days: 250 working days/year
    EF: 0.17 kg CO₂e/km

    CO₂e = 15 × 250 × 1 × 0.17 × 2 = 1,275 kg CO₂e/year
    ```
  </Accordion>
</AccordionGroup>

### Freight Transportation

<AccordionGroup>
  <Accordion title="Freight Emission Factors">
    For freight transportation, emission factors depend on:

    * **Transport mode**: road, rail, sea, air
    * **Vehicle type**: truck size, ship type, aircraft type
    * **Load factor**: weight transported in tonnes

    **Calculation:**

    **CO₂e = Distance (km) × Weight (tonnes) × Emission Factor (kg CO₂e/tonne-km)**

    Emission factors from Ecoinvent account for:

    * Fuel consumption per tonne-km
    * Vehicle efficiency
    * Empty return trips (where applicable)
  </Accordion>

  <Accordion title="Transport Mode Comparison">
    Typical emission factors by transport mode (kg CO₂e per tonne-km):

    | Mode | EF Range    | Notes                      |
    | ---- | ----------- | -------------------------- |
    | Air  | 0.5 - 1.0   | Highest emissions, fastest |
    | Road | 0.05 - 0.15 | Varies by truck size       |
    | Rail | 0.02 - 0.05 | Low emissions for bulk     |
    | Sea  | 0.01 - 0.03 | Lowest per tonne-km        |

    These are indicative ranges; actual factors depend on specific vehicle types and routes.
  </Accordion>
</AccordionGroup>

## Best Practices

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

  1. **Prioritize by materiality**: Focus first on largest sources (usually flights and freight)
  2. **Survey employees**: Conduct annual commuting surveys for accurate data
  3. **Integrate booking systems**: Connect travel management systems for automatic capture
  4. **Track trends**: Monitor business travel patterns to identify reduction opportunities
  5. **Consider alternatives**: Rail vs. air, video conferencing vs. travel
</Tip>

## Next Steps

<CardGroup cols={2}>
  <Card title="Category 4: Products Used" icon="box" href="/guides/emissions/iso-14064-category-4-products-used">
    Measure emissions from purchased goods and services
  </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>
