View source: R/metadata_tables.R
get_metadata_table_varval | R Documentation |
Get metadata information about the variables and values for a given table
get_metadata_table_varval(
idTable = NULL,
det = 0,
filter = NULL,
lang = "ES",
validate = TRUE,
verbose = FALSE
)
idTable |
(int): id of the table. For further information about ids click this link. |
det |
(int): level of detail. Valid values: 0, 1 or 2. |
filter |
(list): list of variables and values. Filtering data from tablesWhen we request data from tables there is the possibility of filtering data on the fly using metadata information about the variables and their values that define the series. There are different approaches to build the filter depending on the table type. Case one: tempus tableURL example.
For a tempus table the filter is based on ids. The format is
Case two: px tablesURL example.
For a px table the filter is based on codes. The format is
Case three: tpx tableURL example.
For a tpx table the filter is based on codes. The format is
URL example.
There are tpx tables that contain variable ids and value ids. In this case,
we can use the ids instead of the codes to build the filter. To do this we add
the alias ~id at the end of each id: |
lang |
(string): language of the retrieved data. Set to 'ES' for Spanish or set to 'EN' for English. |
validate |
(logical): validate input parameters.A FALSE value means fewer API calls. Therefore, it is recommended to set it to FALSE when there is no doubt about the validity of the input parameters, including the filter. |
verbose |
(logical): print additional information, including the URL to call the API service. |
Data frame with information about the variables and values that define a table according to the table specified in the function
# Get all the variable and values of the table with identification code "50902"
df <- get_metadata_table_varval(idTable = 50902)
head(df)
# Filter variables and values
df <- get_metadata_table_varval(idTable = 52056,
filter = list(NAC = "00"), validate = FALSE)
head(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.