get_data_by_unit {bdl} | R Documentation |
Get data by unit Id's from BDL API
Description
Retrieve data for given units from BDL with specified format.
Usage
get_data_by_unit(
unitId,
varId,
year = NULL,
type = c("code", "label"),
aggregateId = NULL,
lang = c("pl", "en"),
...
)
Arguments
unitId |
A single 12 character NUTS id code or vector of multiple unit id
codes. If multiple unit codes are used, some columns are not available.
Use |
varId |
A vector of variable Id's.Use |
year |
A vector of years. If |
type |
A type of variables returned, "code" (default), "label" |
aggregateId |
An aggregate id. Use |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
Details
Data to retrieve from
The
BDL Web Services can be filtered with arguments. To get JSON data from specified
directory with custom filters use get_request
directly.
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
Value
A dataset as a tibble.
Examples
# get_data_by_unit(unitId = "023200000000", varId = "3643")
# get_data_by_unit(unitId = "023200000000", varId = c("3643", "2137", "148190"),
# type = "label")
# Multi variable download
# get_data_by_unit(unitId = c("023200000000", "020800000000"),
# varId = c("3643", "2137", "148190"))