get_panel_data {bdl} | R Documentation |
Get panel data by unit and variable Id's from BDL API
Description
Retrieve data for given units from BDL with specified format.
Usage
get_panel_data(unitId, varId, year = NULL, ggplot = FALSE, ...)
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 single Id or vector of variable Id's.Use |
year |
A vector of years. If |
ggplot |
Output in a long format suitable for ggplot2. Allows to plot results directly with ggplot function. |
... |
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_panel_data(unitId = "030210101000", varId = "60270")
# get_panel_data(unitId = "030210101000", varId = c("60270", "461668"))
# get_panel_data(unitId = c("030210101000", "030210105000", "030210106000"),
# varId = c("60270", "461668"), year = c(2013:2016))
# get_panel_data(unitId = c("030210101000", "030210105000", "030210106000"),
# varId = c("60270", "461668"), ggplot = TRUE)