Description Usage Arguments Value
This function pulls the trade data from the database. The main function pulling the data is faosws::GetData, but additional steps are performed by this function (such as setting up the appropriate pivot, adding variables which are missing from the data as NA's, and setting data with missing flags and 0 values to NA values).
1 2 | getAreaData(dataContext, areaSownElementCode = "5025",
areaHarvestedElementCode = "5312", seedElementCode = "5525")
|
dataContext |
The context for the data, as generated by the SWS. This object can be created via a call like swsContext.datasets[[1]] (assuming the user is running this script on the SWS or after a call to GetTestEnvironment). |
areaSownElementCode |
The element code providing the dimension which corresponds to the area sown variable in the database. |
areaHarvestedElementCode |
The element code providing the dimension which corresponds to the area harvested variable in the database. |
seedElementCode |
The element code providing the dimension which corresponds to the seed variable in the database. |
A data.table object containing the data queried from the database.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.