get_data_series_filter | R Documentation |
Get data from series for a specific operation given a filter
get_data_series_filter(
operation = NULL,
filter = NULL,
periodicity = NULL,
nlast = 1,
dateStart = NULL,
dateEnd = NULL,
det = 0,
tip = NULL,
lang = "ES",
page = 1,
validate = TRUE,
verbose = FALSE,
unnest = FALSE
)
operation |
(string): Code of the operation. To obtain a list of
available operations see |
filter |
(list): list of variables and values. Filtering data from seriesWhen we request data from series there is the possibility of filtering data
on the fly using metadata information about the variables and their values
that define the series. To get variables for a given operation see
Filter formatThe format is
Using shortcutsAdditionally, shortcuts can be used to filter. They simplify the filtering
approach by using standardized names for variable IDs and therefore simplify
their use. The format is:
|
periodicity |
(int): id of the periodicity of the series. Common periodicities:
1 (monthly), 3 (quarterly), 6 (bi-annual), 12 (annual). To obtain a list
of periodicities see |
nlast |
(int): number of periods to retrieve. By default is set to 1 period. |
dateStart |
(string): the initial date of the requested data. The required format is yyyy/mm/dd. Additionally, dateStart can be a vector of dates, where each date represents the start date of individual ranges where the end date should be found at the same position in the dateEnd vector. If dateStart and dateEnd are equal, the specified dates are retrieved. If no end date is entered, all dates will be queried, from the corresponding start date to the last available period. |
dateEnd |
(string): the end date of the requested data. The required format is yyyy/mm/dd. Additionally, dateEnd can be a vector of dates, where each date represents the end date of individual ranges where the initial date should be found at the same position in the dateStart vector. The length of the dateEnd vector must be less than or equal to the length of the dateStart vector. |
det |
(int): level of detail. Valid values: 0, 1 or 2. |
tip |
(string): set to 'A' for friendly output (e.g. readable dates), set to 'M' to include metadata or set to 'AM' for both. |
lang |
(string): language of the retrieved data. Set to 'ES' for Spanish or set to 'EN' for English. |
page |
(int): page number. The retrieved result of the query is paginated. Default value is set to 1. |
validate |
(logical): validate the 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. |
unnest |
(logical): obtain a single data frame of data |
Data frame with data of series according to the operation and filter specified in the function
# Get last five periods and filter data of time series from "IPC" operation
filter <- list("115"= "28", "3" = "84", "762" = "304092")
df <- get_data_series_filter(operation = "IPC", periodicity = 1,
nlast = 5, unnest = TRUE, validate = FALSE, filter = filter)
head(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.