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: 366 × 23
#>    Count…¹ AMW.R…²  Year Species Live.…³ Prop.…⁴ Worki…⁵ Prop.…⁶ Prop.…⁷ Worki…⁸
#>    <chr>   <chr>   <dbl> <chr>     <dbl>   <dbl>   <dbl>   <dbl>   <dbl>   <dbl>
#>  1 CHNM    SAS      1960 Asses   1000000   0.822 822314.    0.15    0.85 123347.
#>  2 CHNM    SAS      1960 Buffal… 1000000   0.492 492313.    0.76    0.24 374158.
#>  3 CHNM    SAS      1960 Cattle  1000000   0.649 648557.    0.73    0.27 473446.
#>  4 CHNM    SAS      1960 Horses  1000000   0.8   800000     0.06    0.94  48000 
#>  5 CHNM    SAS      1960 Mules   1000000   0.725 724638.    0.15    0.85 108696.
#>  6 CHNM    SAS      1960 Cameli… 1000000   0.9   900000     0.01    0.99   9000 
#>  7 CHNM    SAS      1961 Asses   1000000   0.822 822314.    0.15    0.85 123347.
#>  8 CHNM    SAS      1961 Buffal… 1000000   0.492 492313.    0.76    0.24 374158.
#>  9 CHNM    SAS      1961 Cattle  1000000   0.645 644913.    0.73    0.27 470786.
#> 10 CHNM    SAS      1961 Horses  1000000   0.8   800000     0.06    0.94  48000 
#> # … with 356 more rows, 13 more variables: 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>, `Primary.energy.total [MJ/year]` <dbl>,
#> #   `Primary.energy.Ag [MJ/year]` <dbl>, `Primary.energy.Tr [MJ/year]` <dbl>,
#> #   `Power.per.animal [W]` <dbl>, `Working.seconds [seconds per animal]` <dbl>,
#> #   `Useful.energy.total [MJ/year]` <dbl>, …