Tidy live animals data from the FAO
tidy_fao_live_animals.Rd
Create a tidy data frame using data supplied by the function
MWTools::down_fao_live_animals
.
Usage
tidy_fao_live_animals(
.df,
country_name = MWTools::mw_constants$country_name,
species = MWTools::mw_constants$species,
year = MWTools::mw_cols$year,
unit = MWTools::mw_cols$unit,
value = MWTools::mw_constants$value,
value_count = MWTools::mw_constants$value_count,
mw_species = MWTools::mw_species,
cattle = MWTools::mw_species$cattle,
cattle_and_buffaloes = MWTools::mw_species$cattle_and_buffaloes,
buffaloes = MWTools::mw_species$buffaloes,
area_fao_col = MWTools::fao_cols$area_fao_col,
item_fao_col = MWTools::fao_cols$item_fao_col,
year_fao_col = MWTools::fao_cols$year_fao_col,
unit_fao_col = MWTools::fao_cols$unit_fao_col,
value_fao_col = MWTools::fao_cols$value_fao_col,
col_1960 = MWTools::hmw_analysis_constants$col_1960,
col_2020 = MWTools::hmw_analysis_constants$col_2020
)
Arguments
- .df
A data frame containing the raw FAO live animals data, corresponding to the "QCL" FAO bulk download query.
- country_name, species, year, unit, value, value_count
- mw_species
A list all species used in the
MWTools
package, seeMWTools::mw_species
.- cattle, cattle_and_buffaloes, buffaloes
See
MWTools::mw_species
.- area_fao_col, item_fao_col, year_fao_col, unit_fao_col, value_fao_col
See
MWTools::fao_cols
.- col_1960, col_2020
Examples
live_animals_data <- read.csv(file = MWTools::amw_test_data_path()) %>%
tidy_fao_live_animals()