dict_ims: Dictionary to look up region geographies based on countries...

Description Usage Format Source Examples

Description

Intended for use as a custom dictionary with the countrycode package, where the existing UN region and area codes do not match those used by UN DESA in the WPP, see https://github.com/vincentarelbundock/countrycode/issues/253

Usage

1

Format

Data frame with 237 rows and 13 columns. One of first three columns intended as input for origin in countrycode.

name

Country name

iso3n

ISO 3 letter code

iso3c

ISO numeric code

Remaining columns intended as input for destination in countrycode.

region

Geographic region of country (6)

region_sub

Geographic sub region of country (22). Filled using region if none given in original data

region_sdg

SDG region of country (8)

region_sdg_sub

Sub SDG region of country (9). Filled using region_sdg if none given in original data

un_develop

UN development group of country (3)

wb_income

World Bank income group of country (3)

wb_income_detail

Detailled World Bank income group of country (4)

lldc

Indicator variable for Land-Locked Developing Countries (32)

sids

Indicator variable for Small Island Developing States (58)

region_as2014

Region grouping used for global chord diagram plots by Abel and Sander (2014)

region_sba2014

Region grouping used for global chord diagram plots by Sander, Abel and Bauer (2014)

region_a2018

Region grouping used for global chord diagram plots by Abel (2018)

region_ac2021

Region grouping used for global chord diagram plots by Abel and Cohen (2021)

Source

The aggregates_correspondence_table_2020_1.xlsx file of United Nations Department of Economic and Social Affairs, Population Division (2020). International Migrant Stock 2020.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
library(tidyverse)
library(countrycode)
# download Abel and Cohen (2019) estimates
f <- read_csv("https://ndownloader.figshare.com/files/26239945")

# use dictionary to get region to region flows
d <- f %>%
  mutate(
    orig = countrycode(
      sourcevar = orig, custom_dict = dict_ims,
      origin = "iso3c", destination = "region"),
    dest = countrycode(
      sourcevar = dest, custom_dict = dict_ims,
      origin = "iso3c", destination = "region")
  ) %>%
  group_by(year0, orig, dest) %>%
  summarise_all(sum)
d

## End(Not run)

migest documentation built on Dec. 11, 2021, 10:03 a.m.