Produce a tidy human muscle work data frame
tidy_hmw_pfu.Rd
Produce a tidy human muscle work data frame
Usage
tidy_hmw_pfu(
.df,
year = MWTools::mw_cols$year,
sector_col = MWTools::mw_constants$sector_col,
species = MWTools::mw_constants$species,
energy_col = MWTools::mw_cols$e_dot,
stage_col = MWTools::mw_constants$stage_col,
units_col = MWTools::mw_cols$unit,
sex_ilo_col = MWTools::ilo_cols$sex_ilo_col,
country_col = MWTools::conc_cols$country_col,
hmw_region_code_col = MWTools::conc_cols$hmw_region_code_col,
labor_type_col = MWTools::hmw_analysis_constants$labor_type_col,
final_energy_col = MWTools::hmw_analysis_constants$final_energy_col,
primary_energy_col = MWTools::hmw_analysis_constants$primary_energy_col,
useful_energy_hmw_col = MWTools::hmw_analysis_constants$useful_energy_hmw_col
)
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
,add_hmw_analysis_sectors
,calc_hmw_final_energy
,calc_hmw_primary_energy
, andcalc_hmw_useful_energy
functions in sequence on the raw FAO data.- year, sector_col, species, energy_col, stage_col, units_col
- sex_ilo_col
See
MWTools::ilo_cols
.- country_col, hmw_region_code_col
See
MWTools::conc_cols
.- final_energy_col, primary_energy_col, useful_energy_hmw_col, labor_type_col
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)
tidied_pfu_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() |>
tidy_hmw_pfu()