location_code_to_iso3: Convert location codes to ISO 3166-1 alpha-3 country codes

View source: R/location_code_to.R

location_code_to_iso3R Documentation

Convert location codes to ISO 3166-1 alpha-3 country codes

Description

Returns the ISO 3166-1 alpha-3 country code for each location code. Currently all Norwegian location codes map to "nor".

Usage

location_code_to_iso3(x)

Arguments

x

A character vector of location codes, or a data.table / data.frame containing a column named location_code.

Value

A character vector the same length as x (or with as many elements as there are rows in x when x is a data.table), containing the corresponding ISO 3166-1 alpha-3 country code (always "nor").

Examples

csdata::location_code_to_iso3(c("nation_nor", "county_nor03", "municip_nor0301"))

library(data.table)
dt <- data.table(location_code = c("nation_nor", "county_nor03"))
csdata::location_code_to_iso3(dt)

csdata documentation built on July 3, 2026, 1:07 a.m.