Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getFAOtoSYB

Access to FAO FAOSTAT API


Description

A wrapper function using getFAO() to obtain and process multiple data set to obtain data.

Usage

getFAOtoSYB(
  name = NULL,
  domainCode = "RL",
  elementCode = 5110,
  itemCode = 6621,
  query,
  printURL = FALSE,
  useCHMT = TRUE,
  yearRange = NULL,
  countrySet = NULL,
  outputFormat = c("wide", "long"),
  returnFlags = FALSE
)

Arguments

name

The name to be given to the variable.

domainCode

The domain code of the variable, see details.

elementCode

The element code of the variable, see details.

itemCode

The item code of the variable, see details.

query

The object created if using the FAOsearch function

printURL

Whether the url link for the data should be printed

useCHMT

logical, whether the CHMT function should be

yearRange

A numeric vector containing the years to be downloaded.

countrySet

The FAOSTAT codes of those countries to be downloaded.

outputFormat

The format of the data, can be 'long' or 'wide'. appied to avoid double counting of China.

returnFlags,

Logical, whether the flags should be returned. Only work with outputFormat long.

Value

A list containing the following elements

entity

The entity level data

aggregates

The aggregates provided by the FAO

results

The status of the download, whether success/failed

See Also

Examples

## The default option is the arable land area
## arlLand.lst = getFAOtoSYB()

FAOSTAT

Download Data from the FAOSTAT Database

v2.2.1
GPL (>= 2)
Authors
Michael C. J. Kao <michael.kao@fao.org>, Markus Gesmann, Filippo Gheri
Initial release
2020-11-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.