Package 'nisrarr'

Title: Download Data from the NISRA Data Portal
Description: Download data from the Northern Ireland Statistics and Research Agency (NISRA) data portal, accessed at <https://data.nisra.gov.uk>. NISRA is a government agency and the principal source of official statistics and social research on Northern Ireland.
Authors: Mark Paulin [aut, cre, cph]
Maintainer: Mark Paulin <[email protected]>
License: MIT + file LICENSE
Version: 0.1.1.9000
Built: 2026-05-16 06:34:44 UTC
Source: https://github.com/MarkPaulin/nisrarr

Help Index


Get metadata

Description

Retrieve metadata from a dataset, such as contact information, notes, and official statistics status.

Usage

get_metadata_field(x, field)

get_metadata(x)

Arguments

x

A nisra_df object created using nisra_read_dataset()

field

The metadata field to read. See details for a list of fields.

Details

Every dataset should have the following metadata fields:

  • contact - contact name, email and phone

  • copyright - copyright information

  • experimental - a flag for experimental statistics

  • note - any notes describing the data

  • official - a flag for official statistics

  • subject - a code and label for the subject

  • updated - date

Value

Metadata if the field is found, otherwise NULL

Examples

mye <- nisra_read_dataset("MYE01T09")
get_metadata(mye)
get_metadata_field(mye, "contact")

Create a nisra_df object

Description

Create a nisra_df, a data-frame with additional metadata. This uses vctrs::new_data_frame() to convert the ... argument to a data-frame.

Usage

nisra_df(..., meta = list())

Arguments

...

named arguments to convert to columns, or an existing data-frame, or a named list of columns

meta

List of metadata fields

Value

A nisra_df, a tbl_df with an additional "nisra_df" class attribute


Attach boundaries to a dataset

Description

Attach boundaries to a dataset

Usage

nisra_get_boundaries(x)

Arguments

x

A nisra_df dataset

Value

An sf object with all the columns of x and an additional geometry column.


Read NISRA data portal dataset

Description

Fetch a dataset from the NISRA data portal using the dataset code. You can search for a dataset using nisra_search().

Usage

nisra_read_dataset(dataset_code, flush_cache = FALSE)

Arguments

dataset_code

Dataset code

flush_cache

Ignore cached values

Value

A tibble with the requested dataset. If dataset_code is not found, an error will be thrown.

Examples

claimant_count_lgd <- nisra_read_dataset("CCMLGD")