Skip to contents

Calculate the useful energy produced by human workers

Usage

calc_hmw_useful_energy(
  .df,
  sector_col = MWTools::mw_constants$sector_col,
  year = MWTools::mw_cols$year,
  unit = MWTools::mw_cols$unit,
  sex_ilo_col = MWTools::ilo_cols$sex_ilo_col,
  hmw_region_code_col = MWTools::conc_cols$hmw_region_code_col,
  hmw_analysis_data_path = MWTools::hmw_analysis_data_path(),
  hmw_power_sheet = MWTools::hmw_analysis_constants$hmw_power_sheet,
  labor_type_col = MWTools::hmw_analysis_constants$labor_type_col,
  power_col = MWTools::hmw_analysis_constants$power_col,
  total_wk_hrs_ilo_col = MWTools::hmw_analysis_constants$total_wk_hrs_ilo_col,
  useful_energy_hmw_col = MWTools::hmw_analysis_constants$useful_energy_hmw_col,
  hours_to_seconds = MWTools::unit_constants$hours_to_seconds,
  joules_to_megajoules = MWTools::unit_constants$joules_to_megajoules
)

Arguments

.df

A data frame containing the final and useful energy consumed by human workers. Usually produced by calling the add_hmw_region_codes, fill_ilo_data, calc_total_hours_worked, get_broad.sector_data, split_labor_by_sector, calc_hmw_final_energy, and calc_hmw_primary_energy functions in sequence on the raw FAO data.

sector_col, year, unit

See MWTools::mw_constants.

sex_ilo_col

See MWTools::ilo_cols.

hmw_region_code_col

See MWTools::conc_cols.

hmw_analysis_data_path, hmw_power_sheet, power_col, total_wk_hrs_ilo_col, useful_energy_hmw_col, hours_to_seconds, joules_to_megajoules, labor_type_col

See MWTools::hmw_analysis_constants.

Examples

ilo_working_hours_data <- read.csv(file = MWTools::ilo_working_hours_test_data_path())
ilo_employment_data <- read.csv(file = MWTools::ilo_employment_test_data_path())
hmw_data <- prepareRawILOData(ilo_working_hours_data = ilo_working_hours_data,
                              ilo_employment_data = ilo_employment_data)
useful_energy_data <- hmw_data |>
  add_hmw_region_codes() |>
  fill_ilo_data() |>
  calc_total_hours_worked() |>
  get_broad.sector_data() |>
  split_labor_by_sector() |>
  calc_hmw_final_energy() |>
  calc_hmw_primary_energy() |>
  calc_hmw_useful_energy()