Description Usage Arguments Details Value See Also Examples
Returns top and bottom commodities in terms of aggregate production, harvested area, and/or value of production.
1 |
var |
one or several of "harvested area", "production", or "value of production". These argument can be abbreviated to "h", "p" or "v". May be expanded in the future to include additional sub-groups of indicators. |
by |
by default returns aggregate production across all selected countries.
|
... |
optional arguments passed to |
API call: rank commodities in Angola and Mozambique by harvested area and production
$ curl http://hcapi.harvestchoice.org/ocpu/library/hcapi3/R/genRank/json \
-d '{"var" : ["h", "p"], "iso3" : ["AGO", "MOZ"]}' \
-X POST -H 'Content-Type:application/json'
API call: rank commodities across Angola's agro-ecological zones by production
$ curl http://hcapi.harvestchoice.org/ocpu/library/hcapi3/R/genRank/json \
-d '{"var" : "p", "iso3" : "AGO", "by" : "AEZ5_CLAS"}' \
-X POST -H 'Content-Type:application/json'
data.table(s) of commodities ranked from top to bottom
hcapi
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.