Learn R Programming

This package provides various indices, like Crude Migration Rate, different Gini indices or the Coefficient of Variation among others, to show the (un)equality of migration.

Installation

Most recent stable version can be installed directly from CRAN:

install.packages('migration.indices')

Or please use devtools for the development version:

library(devtools)
install_github('migration.indices', 'daroczig')

Examples:

The below migration matrix is a demo dataset based on

  • David A. Plane and Gordon F. Mulligan (1997): Measuring Spatial Focusing in a Migration System. In. Demography, Vol. 34, No. 2 (May, 1997), pp. 251-262
library(migration.indices)
data(migration.hyp)
res <- migration.gini(migration.hyp)
res

Resulting in:

Total Flows Gini Index:              0.2222222
Rows Gini Index:                     0
Standardized Rows Gini Index:        0
Columns Gini Index:                  0.05555556
Standardized Columns Gini Index:     25
Exchange Gini Index:                 0.05555556
Standardized Exchange Gini Index:    25
In-migration Field Gini Index:       vector
Weighted In-migration Gini Index:    0.1222222
Out-migration Field Gini Index:      vector
Weighted Out-migration Gini Index:   0
Migration-weighted Mean Gini Index:  0.06111111

Where In and Out-migration Field Gini Index are vectors:

> res$migration.gini.in
[1] 0.2000000 0.5000000 0.3333333
> res$migration.gini.out
[1] 0 0 0

World dataset

Using the Global Bilateral Migration Database (2000) of World Bank:

data(migration.world)
migration.gini(migration.world)

Results in:

Total Flows Gini Index:              0.9855174
Rows Gini Index:                     0.004272225
Standardized Rows Gini Index:        0.4335008
Columns Gini Index:                  0.004067787
Standardized Columns Gini Index:     0.4127565
Exchange Gini Index:                 1.382263e-05
Standardized Exchange Gini Index:    0.001402575
In-migration Field Gini Index:       vector
Weighted In-migration Gini Index:    0.004241788
Out-migration Field Gini Index:      vector
Weighted Out-migration Gini Index:   0.004171575
Migration-weighted Mean Gini Index:  0.004206681

Copy Link

Version

Install

install.packages('migration.indices')

Monthly Downloads

226

Version

0.3.1

License

AGPL-3

Issues

Pull Requests

Stars

Forks

Last Published

June 13th, 2022

Functions in migration.indices (0.3.1)

migration.connectivity

Migration Connectivity Index
migration.effectiveness

Migration Effectiveness Index
migration.acv.out

Aggregated Out-migration Coefficient of Variation
migration.cmr

Crude Migration Rate
migration.acv.in

Aggregated In-migration Coefficient of Variation
check.migration.matrix

Check Migration Matrix
migration.cv.out

Out-migration Coefficient of Variation
migration.cv.in

In-migration Coefficient of Variation
migration.field.diagram

Joint plot for in and out-migration fields
migration.acv

Aggregated System-wide Coefficient of Variation
migration.gini

Spatial Gini Indexes
migration.gini.in

In-migration Field Gini Index
migration.gini.exchange.standardized

Standardized Exchange Gini Index
migration.gini.out

Out-migration Field Gini Index
migration.gini.row

Rows Gini Index
migration.gini.exchange

Exchange Gini Index
migration.indices

Migration indices
migration.gini.col.standardized

Standardized Columns Gini Index
migration.hyp

Hypotetical Migration Matrix
migration.inequality

Migration Inequality Index
migration.rate

Aggregate net migration rate
migration.gini.row.standardized

Standardized Rows Gini Index
migration.weighted.gini.out

Migration-weighted Out-migration Gini Index
migration.gini.total

Total Flows Gini Index
migration.world

Global Bilateral Migration Database (2000)
migration.gini.col

Columns Gini Index
migration.weighted.gini.in

Migration-weighted In-migration Gini Index
migration.weighted.gini.mean

Migration-weighted Mean Gini Index