View source: R/calc_amw_functions.R
calc_yearly_feed | R Documentation |
Calculate the yearly feed requirements of working animals by species and region.
This function uses user-supplied data supplied via amw_analysis_data_path
for daily
feed requirements of working animals on working and non-working days by species
and region, and user-supplied data for the number of working days by species
and region to estimate the total yearly feed requirements.
calc_yearly_feed(
.df,
amw_analysis_data_path = MWTools::amw_analysis_data_path(),
concordance_species = MWTools::conc_cols$species,
method_source = MWTools::mw_constants$method_source,
wa_feed_sheet = MWTools::amw_analysis_constants$wa_feed_sheet,
wa_days_hours_sheet = MWTools::amw_analysis_constants$wa_days_hours_sheet,
working_days_col = MWTools::amw_analysis_constants$working_days_col,
nonworking_days_col = MWTools::amw_analysis_constants$nonworking_days_col,
working_hours_col = MWTools::amw_analysis_constants$working_hours_col,
working_day_feed_col = MWTools::amw_analysis_constants$working_day_feed_col,
nonworking_day_feed_col = MWTools::amw_analysis_constants$nonworking_day_feed_col,
working_yearly_feed_col = MWTools::amw_analysis_constants$working_yearly_feed_col,
nonwkg_yearly_feed_col = MWTools::amw_analysis_constants$nonwkg_yearly_feed_col,
total_yearly_feed_col = MWTools::amw_analysis_constants$total_yearly_feed_col,
amw_region_code_col = MWTools::conc_cols$amw_region_code_col
)
.df |
A data frame containing tidied data for the number of live and
working animals. Usually produced by calling the
|
amw_analysis_data_path |
The path to the animal muscle work analysis data,
containing feed requirements of working animals
in agriculture and transport, by species, country, and
over time. Set to the function |
concordance_species |
See |
method_source |
See |
wa_feed_sheet , wa_days_hours_sheet , working_days_col , nonworking_days_col , working_hours_col , working_day_feed_col , nonworking_day_feed_col , working_yearly_feed_col , nonwkg_yearly_feed_col , total_yearly_feed_col |
See |
amw_region_code_col |
See |
working_animals_data <- read.csv(file = MWTools::amw_test_data_path()) %>%
tidy_fao_live_animals() %>%
add_concordance_codes() %>%
trim_fao_data() %>%
get_working_species() %>%
calc_working_animals() %>%
calc_sector_split() %>%
calc_yearly_feed()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.