View source: R/norman_api_definitions.R
| norman_api_definitions | R Documentation |
This function provides the norman API definitions. It assigns a list structure that acts as a dictionary, allowing for auto-completion (Intellisense) in RStudio when accessing modules and parameters.
norman_api_definitions(path = NULL)
path |
A character string specifying the path to the JSON file. If NULL, it attempts to locate 'api_definitions.json' within the package's 'extdata' directory. |
A named list (dictionary) containing two main sections:
modules: A list where names are module names (e.g., susdat) and values are character vectors of allowed parameters.
parameters: A list where names are parameter keys and values are their English descriptions.
patterns: A collection of common regular expression patterns used for splitting or filtering data
## Not run:
# 1. Load the definitions
defs <- load_api_definitions()
# 2. Access available modules (RStudio will trigger auto-complete after $)
# defs$modules$Substance
# 3. Access parameter descriptions
# defs$parameters$`Country Alpha-2 code`
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.