Skip to contents

Get type and amount of residue produced for each crop production item.

Usage

get_primary_residues(file_path)

Arguments

file_path

The local path where the input CSV is located. It is recommended to use an autogenerated path by get_file_path() function.

Value

A tibble with the crop residue data. It contains the following columns:

  • year: The year in which the recorded event occurred.

  • area_code: The code of the country where the data is from. For code details see e.g. add_area_name().

  • item_cbs_code_crop: FAOSTAT internal code for each commodity balance sheet item. This is the crop that is generating the residue.

  • item_cbs_code_residue: FAOSTAT internal code for each commodity balance sheet item. This is the obtained residue. In the commodity balance sheet, this can be three different items right now:

    • 2105: Straw

    • 2106: Other crop residues

    • 2107: Firewood

    These are actually not FAOSTAT defined items, but custom defined by us. When necessary, FAOSTAT codes are extended for our needs.

  • value: The amount of residue produced, measured in tonnes.

Examples

if (FALSE) { # \dontrun{
get_primary_residues(get_file_path("crop_residues"))
} # }