Skip to contents

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.

Value

Metadata if the field is found, otherwise NULL

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

Examples

mye <- nisra_read_dataset("MYE01T09")
get_metadata(mye)
#> Label: Mid-year population estimates
#> Subject: Population
#> Type: Official statistics
#> Updated: 2025-05-08T9:30:00.000Z
#> Note: [b]Description of Data[/b]

#> 

#> Notes:

#> 

#> 1. The estimates are produced using a variety of data ...
#> Contact: Population Statistics
#> Contact email: census@nisra.gov.uk
#> Contact phone: +44 (0)28 90255156
#> Copyright: Crown Copyright (https://www.nisra.gov.uk/crown-copyright)
get_metadata_field(mye, "contact")
#> $name
#> [1] "Population Statistics"
#> 
#> $email
#> [1] "census@nisra.gov.uk"
#> 
#> $phone
#> [1] "+44 (0)28 90255156"
#>