Learn R Programming

bdl (version 1.0.5)

get_units: Get unit NUTS codes.

Description

Retrieve all unit codes or sub to given unit,

Usage

get_units(
  parentId = "",
  level = NULL,
  sort = c("id", "-id", "name", "-name"),
  lang = c("pl", "en"),
  ...
)

Value

A dataset as a tibble.

Arguments

parentId

A 12 character NUTS id code of parent unit. Use search_units to find unit id code.

level

A number from 0 to 6, filters the returned unit by its level. If NULL (default) no level filters apply. Use get_levels to find more info.

sort

A type of sorting, "id" (default), "-id", "name", "-name"

lang

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

...

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

Details

To get all units skip the parentId parameter. Warning! Downloading all unit can take around 1 minute.

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)).

Examples

Run this code
    # get_units(level = 2)
    # get_units("010000000000")

Run the code above in your browser using DataLab