Learn R Programming

enigma (version 0.3.0)

enigma_metadata: Search for metadata on a dataset from Enigma.

Description

Search for metadata on a dataset from Enigma.

Usage

enigma_metadata(dataset = NULL, key = NULL, ...)

Arguments

dataset
Dataset name. Required.
key
(character) Required. An Enigma API key. Supply in the function call, or store in your .Renviron file like ENIGMA_KEY=your key), or in your .Rprofile file as options(enigmaKey = "<your key>"), Obtain an API key by creating an account with Enigma at http://enigma.io, then obtain an API key from your account page.
...
Named curl options passed on to HttpClient

Value

A list of length 3:
  • success - a boolean if query was successful or not
  • datapath - the dataset path (this is not a file path on your machine)
  • info - a list of length 6 with:
    • paths - paths under the dataset
    • immediate_notes - children nodes
    • children_tables - children tables

Details

Notice when you run the examples that the format of output is different for the "parent nodes" vs. the "table nodes". Where the parent nodes have ouput$meta slots for paths, immediate nodes and children tables, while the table nodes have ouput$meta slots for info, table, ancestor datapaths, database boundary datapath, database boundary label, database boundary tables, and paths, and an additional slot for description of table column attributes.

References

https://app.enigma.io/api#metadata

Examples

Run this code
## Not run: ------------------------------------
# ## After obtaining an API key from Enigma's website, pass in your key to the 
# ## function call or set in your options (see above instructions for the 
# ## key parameter) If you pass in your key to the function call use the key 
# ## parameter
# 
# ## UCLA Ethnic power relations dataset
# enigma_metadata(dataset = 'edu.ucla.epr')
# 
# # Table node response attributes
# ## US white house visitor list table
# enigma_metadata(dataset = 'us.gov.whitehouse.visitor-list')
## ---------------------------------------------

Run the code above in your browser using DataLab