ons_codes: Explore codes and lists

View source: R/03-code-lists.R

ons_codesR Documentation

Explore codes and lists

Description

Used to get details about codes and code lists stored by ONS. Codes are used to provide a common definition when presenting statistics with related categories. Codes are gathered in code lists, which may change over time to include new or different codes. The meaning of a code should not change over time, but new codes may be created where new meaning is required.

Usage

ons_codes(code_id = NULL, edition = NULL)

ons_code(code_id = NULL, edition = NULL, code = NULL)

ons_code_dataset(code_id = NULL, edition = NULL, code = NULL)

Arguments

code_id

⁠[character]⁠. The id of a codelist.

edition

⁠[character]⁠ A subset of the dataset representing a specific time period. For some datasets this edition can contain all time periods (all historical data). The latest version of this is displayed by default.

code

⁠[character]⁠ The ID of the code within a code list.

Value

A list or character vector.

Examples



#codes
ons_codes(code_id = "quarter", edition = "one-off")
ons_code(code_id = "quarter", edition = "one-off", code = "q2")

ons_code_dataset(code_id = "quarter", edition = "one-off", code = "q2")


onsr documentation built on May 29, 2024, 2:50 a.m.