Description Usage Arguments Details Value See Also Examples
Auxiliary files and metadata are appended to all data packages, but may also be generated separately. Variable metadata is made available in tabular (.csv) and in JSON (.json) format in conformity with Tabular Data Package RFC specifications at http://dataprotocols.org/tabular-data-package/.
1 | datapackage(var, format = NULL, dir = ".")
|
var |
character array of HarvestChoice indicator code(s) |
format |
file extension corresponding to the data package output
format. See |
dir |
character, optional output directory. Default to current working directory. |
API call: Generate auxiliary files for soil organic carbon concentration and 2012 total population
$ curl http://hcapi.harvestchoice.org/ocpu/library/hcapi3/R/datapackage \
-d '{"var" : ["soc_d5", "PN12_TOT"]}' \
-X POST -H 'Content-Type:application/json'
character array of generated auxiliary file names
indicator and category for other convenience methods to query HarvestChoice metadata.
1 2 3 4 | # Generate auxiliary files for soil organic carbon concentration and 2012 total population
x <- datapackage(c("soc_d5", "PN12_TOT"))
x <- fread(x[1])
x
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.