View source: R/data_functions.R
imf_parameters | R Documentation |
List input parameters and available parameter values for use in making API requests from a given IMF database.
imf_parameters(database_id, times = 3)
database_id |
character string of a |
times |
numeric. Maximum number of API requests to attempt. |
Retrieves a list of data frames containing all possible input
parameters for requests from a given database available through the IMF API.
Each data frame in the returned list has an input_code
column and a
description
column. Retrieve the list, filter each data frame for the
parameters you want, and then supply the modified list object to the
imf_dataset
function as its parameters
argument.
Alternatively, individually supply input_code
values from each data
frame as arguments to imf_dataset
.
Returns a named list of data frames. Each list item name corresponds
to an input parameter for API requests from the database. All list items are
data frames, with an input_code
column and a description
column. The input_code
column is a character vector of all possible
input codes for that parameter when making requests from the IMF API
endpoint. The descriptions
column is a character vector of text
descriptions of what each input code represents.
# Fetch the full list of indicator codes and descriptions for the Primary
# Commodity Price System database
params <- imf_parameters(database_id = 'PCPS')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.