Skip to contents

Calculate the useful energy produced by working animals performing muscle work

Usage

calc_useful_energy(
  .df,
  amw_analysis_data_path = MWTools::amw_analysis_data_path(),
  species = MWTools::mw_constants$species,
  method_source = MWTools::mw_constants$method_source,
  wa_power_sheet = MWTools::amw_analysis_constants$wa_power_sheet,
  wa_days_hours_sheet = MWTools::amw_analysis_constants$wa_days_hours_sheet,
  working_days_col = MWTools::amw_analysis_constants$working_days_col,
  working_hours_col = MWTools::amw_analysis_constants$working_hours_col,
  working_seconds_col = MWTools::amw_analysis_constants$working_seconds_col,
  amw_region_code_col = MWTools::conc_cols$amw_region_code_col,
  power_per_animal = MWTools::amw_analysis_constants$power_per_animal,
  useful_energy_total = MWTools::amw_analysis_constants$useful_energy_total,
  useful_energy_ag = MWTools::amw_analysis_constants$useful_energy_ag,
  useful_energy_tr = MWTools::amw_analysis_constants$useful_energy_tr,
  working_animals_total_col = MWTools::amw_analysis_constants$working_animals_total_col,
  working_animals_ag_col = MWTools::amw_analysis_constants$working_animals_ag_col,
  working_animals_tr_col = MWTools::amw_analysis_constants$working_animals_tr_col
)

Arguments

.df

A data frame containing the primary and final energy consumed by working animals. Usually produced by calling the tidy_fao_live_animals, add_concordance_codes, trim_fao_data, get_working_species, calc_working_animals, calc_sector_split, calc_yearly_feed, calc_final_energy, and calc_primary_energy functions in sequence on the raw FAO data.

amw_analysis_data_path

The path to the animal muscle work analysis data, containing data for the number of working hours and power outputs of working animals. Set to the function MWTools::amw_analysis_data_path() by default, which returns the path the analysis data bundled with the MWTools package.

species, method_source

See MWTools::mw_constants.

wa_power_sheet, wa_days_hours_sheet

See MWTools::amw_analysis_constants.

working_hours_col, working_seconds_col

See MWTools::amw_analysis_constants.

amw_region_code_col, power_per_animal

See MWTools::amw_analysis_constants.

useful_energy_total, useful_energy_ag, useful_energy_tr

See MWTools::amw_analysis_constants.

working_animals_total_col, working_animals_ag_col, working_animals_tr_col, working_days_col

See MWTools::amw_analysis_constants.

Examples

MWTools::amw_test_data_path() %>%
  read.csv() %>%
  tidy_fao_live_animals() %>%
  add_concordance_codes() %>%
  trim_fao_data() %>%
  get_working_species() %>%
  calc_working_animals() %>%
  calc_sector_split() %>%
  calc_yearly_feed() %>%
  calc_final_energy() %>%
  calc_primary_energy() %>%
  calc_useful_energy()
#> # A tibble: 372 × 23
#>    Country.code AMW.Region.code  Year Species  Live.animals Prop.Working.animals
#>    <chr>        <chr>           <dbl> <chr>           <dbl>                <dbl>
#>  1 CHNM         SAS              1960 Asses         7527000                0.822
#>  2 CHNM         SAS              1960 Buffalo…      8043000                0.492
#>  3 CHNM         SAS              1960 Cattle       49400000                0.649
#>  4 CHNM         SAS              1960 Horses        6585000                0.8  
#>  5 CHNM         SAS              1960 Mules a…      1427000                0.725
#>  6 CHNM         SAS              1960 Camelids       381000                0.9  
#>  7 CHNM         SAS              1961 Asses         7527000                0.822
#>  8 CHNM         SAS              1961 Buffalo…      8043000                0.492
#>  9 CHNM         SAS              1961 Cattle       49400000                0.645
#> 10 CHNM         SAS              1961 Horses        6585000                0.8  
#> # ℹ 362 more rows
#> # ℹ 17 more variables: Working.animals.total <dbl>,
#> #   Prop.Working.animals.Ag <dbl>, Prop.Working.animals.Tr <dbl>,
#> #   Working.animals.Ag <dbl>, Working.animals.Tr <dbl>,
#> #   `Total.yearly.feed [MJ/year per animal]` <dbl>,
#> #   `Final.energy.total [MJ/year]` <dbl>, `Final.energy.Ag [MJ/year]` <dbl>,
#> #   `Final.energy.Tr [MJ/year]` <dbl>, …