UNlocations: United Nations Table of Locations

Description Usage Format Source Examples

Description

United Nations table of locations, including regions, for statistical purposes as available in 2019.

Usage

1
2

Format

A data frame with one observations per country or region. It contains the following variables:

name

Name of country or region (following ISO 3166 official short names in English - see
https://www.iso.org/obp/ui/#search/code/ and United Nations Multilingual Terminology Database - see https://unterm.un.org/unterm).

country_code

Numerical Location Code (3-digit codes following ISO 3166-1 numeric standard) - see http://en.wikipedia.org/wiki/ISO_3166-1_numeric.

reg_code

Code of the regions.

reg_name

Name of the regions.

area_code

Area code.

area_name

Area names, such as Africa, Asia, Europe Latin America and the Caribbean, Northern America, Oceania, World.

location_type

Code giving the type of the observation: 0=World, 2=Major Area, 3=Region, 4=Country/Area, 5=Development group, 12=Special groupings. Other numbers are allowed and they can be used for aggregation, see below.

agcode_1500000, agcode_1501000, agcode_1502000, agcode_1503000, agcode_1517000, agcode_1518000, agcode_1524000, agcode_1636000, agcode_1637000, agcode_1829000, agcode_1830000, agcode_1832000, agcode_1833000, agcode_1835000, agcode_901000, agcode_902000, agcode_917000, agcode_918000, agcode_921000, agcode_927000, agcode_934000, agcode_941000, agcode_947000, agcode_948000, tree_level

Optional columns that can be used for aggregations. To aggregate a region with country_code=x, get the value of its location_type, say y. Then look for the column agcode_y and locate all records with agcode_y=x that have location_type=4, see Example below.

Source

Data provided by the United Nations Population Division.

The designations employed in this dataset do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations concerning the legal status of any country, territory, city or area or of its authorities, or concerning the delimitation of its frontiers or boundaries.

Examples

1
2
3
4
5
6
data(UNlocations)
# Find high income countries in Africa (based on World Bank groups)
grouprec <- subset(UNlocations, name == "High-income countries")
# grouprec$location_type is 1503000, thus look for column agcode_1503000 
subset(UNlocations, agcode_1503000 == grouprec$country_code & 
                            location_type == 4 & area_name == "Africa")

Example output

         name country_code reg_code       reg_name area_code area_name
37 Seychelles          690      910 Eastern Africa       903    Africa
   location_type tree_level agcode_1500000 agcode_1501000 agcode_1502000
37             4          5             -1             -1             -1
   agcode_1503000 agcode_1517000 agcode_1518000 agcode_1636000 agcode_1637000
37           1503             -1             -1             -1           1637
   agcode_1829000 agcode_1830000 agcode_1832000 agcode_1833000 agcode_1835000
37             -1             -1             -1             -1             -1
   agcode_901000 agcode_902000 agcode_917000 agcode_918000 agcode_921000
37            -1           902            -1            -1            -1
   agcode_927000 agcode_934000 agcode_941000 agcode_947000 agcode_948000
37            -1           934            -1           947           948
   agcode_1524000
37             -1

wpp2019 documentation built on March 26, 2020, 6:34 p.m.