pin_birthplace {sweidnumbr}R Documentation

Calculate the birthplace of pin

Description

Calculate the birthplace for a given personal identity number born before 1990. See details.

Usage

pin_birthplace(pin)

Arguments

pin

A vector of class pin. See as.pin.

Details

It is possible to calculate where people where born (and/or if a person has immigrated) through their personal identity number. This is possible for people that was born before 1990 and after 1945.

For people born before 1946 the birthplace identifier contains information on where one where registered the 1st of november 1946.

Personal identity numbers for people born after 1989 do not contain any information on birthplace.

During the period 1946 - 1989 the pin also contains information on whether one has immigrated to Sweden during the period.

Value

Birthplace as factor.

References

SOU 2008:60 : Personnummer och samordningsnummer

Examples

# Example with someone born today and from SKV 704 (see references)
today_pin <- paste0(format(Sys.Date(),"%Y%m%d"), "0000")
ex_pin <- c("196408233234", today_pin)
pin_birthplace(ex_pin)


[Package sweidnumbr version 1.5.0 Index]