Learn R Programming

enigma (version 0.1.1)

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 .Rprofile file, or do options(enigmaKey = ""). Obtain an API key by creating an account with Enigma at http://enigma.io,
...
Named options passed on to GET

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.

Examples

Run this code
# 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

# Parent node response attributes from Whitehouse dataset
## US white house
enigma_metadata(dataset='us.gov.whitehouse')

## 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')

## UCLA Ethnic power relations dataset - armed conflict table
enigma_metadata('edu.ucla.epr.ethnic-armed-conflict')

Run the code above in your browser using DataLab