Description Usage Arguments Value
This function returns the production data currently in the database for a particular DatasetKey. It also performs a few clean-up operations on the data before directly returning.
1 2 3 | getProductionData(dataContext, areaVar = "geographicAreaM49",
itemVar = "measuredItemCPC", elementVar = "measuredElement",
yearVar = "timePointYears")
|
dataContext |
An object of type DatasetKey (defined in faosws). This parameter provides the configuration of the dataset (i.e. which countries, commodities, etc.). |
areaVar |
The column name of the country code column. |
itemVar |
The column name of the commodity code column. |
elementVar |
The column name of the element code column. |
yearVar |
The column name of the year column. |
A list of length 3:
query: A data.table containing the production data from the database.
formulaTuples: The element codes for the production, output, and yield elements. There may be multiple records in this table if multiple elements are relevant.
prefixTuples: This element contains the prefixes for the flags and values.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.