Learn R Programming

carbonr (version 0.2.7)

office_emissions: Office emissions (uses building_emissions + homeworking factors)

Description

Computes office emissions either from a per-person average (when specify = FALSE) or from specified utilities via building_emissions() (when specify = TRUE), plus optional homeworking emissions (Level 1 = "Homeworking").

Usage

office_emissions(
  specify = FALSE,
  office_num = 1,
  WFH_num = 0,
  WFH_hours = 0,
  WFH_type = c("Office Equipment", "Heating"),
  water_supply = 0,
  water_trt = TRUE,
  water_unit = c("cubic metres", "million litres"),
  electricity_kWh = 0,
  electricity_TD = TRUE,
  electricity_WTT = TRUE,
  heat_kWh = 0,
  heat_TD = TRUE,
  heat_WTT = TRUE,
  units = c("kg", "tonnes"),
  value_col = c("value", "value_2024"),
  strict = TRUE
)

Value

Numeric total emissions in requested units.

Arguments

specify

Logical. If FALSE, use an average per person; if TRUE, use the specified utility inputs (water/electricity/heat) via building_emissions().

office_num

Number of individuals in the office (only used when specify = FALSE). Uses a constant of 2600 kg CO2e per person-year.

WFH_num

Number of people working from home.

WFH_hours

Hours worked from home per person. If one of WFH_num/WFH_hours is zero but the other is > 0, the zero one is treated as 1.

WFH_type

Which homeworking components to include; any of c("Office Equipment","Heating"). Default is both.

water_supply

See building_emissions().

water_trt

See building_emissions().

water_unit

See building_emissions().

electricity_kWh, electricity_TD, electricity_WTT

See building_emissions().

heat_kWh, heat_TD, heat_WTT

See building_emissions().

units

Output units: "kg" (default) or "tonnes".

value_col

Which factor column to use in uk_gov_data: "value" or "value_2024".

strict

If TRUE (default), error when needed factors (e.g., homeworking) are missing. If FALSE, treat missing factors as 0.

Details

Factors are assumed kg CO2e per unit (e.g., per person-hour for homeworking), and the result is returned in requested units.

Examples

Run this code
# 1) Use specified utilities (building_emissions) + homeworking
office_emissions(
  specify = TRUE,
  electricity_kWh = 200, heat_kWh = 100,
  water_supply = 10, water_unit = "cubic metres",
  WFH_num = 5, WFH_hours = 8, WFH_type = c("Office Equipment","Heating")
)

# 2) Use per-person average for 12 staff, with WFH equipment only
office_emissions(
  specify = FALSE, office_num = 12,
  WFH_num = 6, WFH_hours = 4, WFH_type = "Office Equipment",
  units = "tonnes"
)

Run the code above in your browser using DataLab