Description Usage Arguments Details Value Examples
Display a histogram and univariate statistics for any selected HarvestChoice variable(s).
See examples below. Note that calling stats(...)
is equivalent to calling the
convenience method hcapi(..., format="stats")
.
1 |
var |
character array of variable codes to plot |
iso3 |
optional country or region filter (3-letter code) |
# API call: generate 2 plots showing farming systems and 2012 population density in Ghana
$ curl http://hcapi.harvestchoice.org/ocpu/library/hcapi3/R/stats \
-d '{"var":["bmi", "cass_y"]}' \
-X POST -H 'Content-Type:application/json'
--
/ocpu/tmp/x09db409895/R/.val
/ocpu/tmp/x09db409895/graphics/1
/ocpu/tmp/x09db409895/graphics/2
/ocpu/tmp/x09db409895/source
/ocpu/tmp/x09db409895/console
/ocpu/tmp/x09db409895/info
/ocpu/tmp/x09db409895/files/DESCRIPTION
Use wget (at the command line) to download the generated plot(s)
$ wget http://hcapi.harvestchoice.org/ocpu/tmp/x09db409895/graphics/1/png
$ wget http://hcapi.harvestchoice.org/ocpu/tmp/x09db409895/graphics/2/png
plot
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.