getFAO: Access to FAO FAOSTAT API.

Description Usage Arguments Details Value See Also

View source: R/getFAO.R

Description

A function to access FAOSTAT data through the FAOSTAT API.

Usage

1
2
3
4
getFAO(name = NULL, domainCode = "RL", elementCode = 5110,
  itemCode = 6621, query, printURL = FALSE, useCHMT = TRUE,
  outputFormat = "wide", returnNames = FALSE, returnFlags = FALSE,
  yearRange = NULL, countrySet = NULL)

Arguments

name

The name to be given to the variable.

domainCode

The domain of the data.

elementCode

The code of the element.

itemCode

The code of the specific item.

yearRange

A numeric vector containing the years to be downloaded.

countrySet

The FAOSTAT codes of those countries to be downloaded.

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 applied to avoid double counting of China.

outputFormat

The format of the data, can be 'long' or 'wide'.

returnNames

Logical, should the area, the element and the item names be reported?.

returnFlags,

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

Details

Need to account for multiple itemCode, currently only support one single variable.

Value

Outputs a data frame containing the specified data.

See Also

getWDI, getWDItoSYB, getFAOtoSYB, FAOsearch


FAOSTAT documentation built on May 29, 2017, 10:53 a.m.