get_data_by_variable_locality {bdl}R Documentation

Get data by variable Id for localities from BDL API

Description

Retrieve data for a given variables for multiple unit localities from BDL with specified format.

Usage

get_data_by_variable_locality(
  varId,
  unitParentId,
  year = NULL,
  lang = c("pl", "en"),
  ...
)

Arguments

varId

A single variable id or vector of multiple variable id's. If multiple id's are used, some columns are not available.. Use search_variables or get_variables to find variable id code.

unitParentId

A 12 character NUTS id code of interested unit. Use search_units or get_units to find unit id code. If NULL (default) and unitLevel not set up, returns all available units for variable.

year

A vector of years. If NULL (default) returns data for all available years.

lang

A language of returned data, "pl" (default), "en"

...

Other arguments passed on to GET. For example a proxy parameters, see details.

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_variable_locality(varId = "415", unitParentId = "011212006063")
   # get_data_by_variable_locality("420", year = "2008", unitParentId = "070000000000")
   
   # Multi variable download
   # get_data_by_variable_locality(varId =c("415","430"), unitParentId = "011212006063")

[Package bdl version 1.0.3 Index]