Data Cart

Your data extract

0 variables
0 samples
View Cart
MIGRATEP
Migration status, previous residence

Codes and Frequencies



Can't find the category you are looking for? Try the Detailed codes

Explore how IPUMS created this variable

Download


      class Migratep : public Editor {

public:
  Migratep(VarPointer varInfo) : Editor(varInfo) {}
  void edit() {

    long a = getRecoded();
    switch (dataSet) {
    case dataset_id::co1964a: {
      if (CO1964A_0011(0) != CO1964A_0407() && CO1964A_0407() < 40)
        a = 20;
      if (CO1964A_0011(0) == 8 && CO1964A_0407() == 9)
        a = 10;
    } break;
    case dataset_id::co1973a: {
      if (CO1973A_0002(0) == CO1973A_0414() * 1000 + CO1973A_0413())
        a = 11;
      else if (CO1973A_0001(0) == CO1973A_0414())
        a = 12;
      else
        a = 20;
      if (CO1973A_0413() == 0)
        a = 30;
    } break;
    case dataset_id::br1960a:
    case dataset_id::br1970a:
    case dataset_id::br1991a: {
      if (MIGBR1.getRecoded() == GEO1B_BR(0))
        a = 12;
    } break;
    case dataset_id::br1980a: {
      int64_t d = (BR1980A_0418() - BR1980A_0418() % 10000) / 10000;
      if (d == BR1980A_0001(0))
        a = 12;
      else if (d == 99 || d == 0)
        a = 11;
      else if (d == 80)
        a = 30;
      else
        a = 20;
    } break;
    case dataset_id::cl1960a: {
      if (CL1960A_0416() != CL1960A_0018(0) && CL1960A_0416() >= 1 &&
          CL1960A_0416() <= 25)
        a = 20;
    } break;
    case dataset_id::cr1963a: {
      if (MIGCR1() != CR1963A_0003(0) && CR1963A_0439() < 800)
        a = 20;
    } break;
    case dataset_id::ec1962a: {
      if (EC1962A_0416() != EC1962A_0018(0) && EC1962A_0416() <= 19)
        a = 20;
    } break;
    case dataset_id::ec1974a: {
      if (EC1974A_0410() != EC1974A_0010(0) && EC1974A_0410() <= 49)
        a = 20;
    } break;
    case dataset_id::ve1981a: {
      if (VE1981A_0410() != VE1981A_0012(0) && VE1981A_0410() <= 24)
        a = 20;
    } break;
    case dataset_id::za1996a: {
      a = 11;
      if (ZA1996A_0420() != ZA1996A_0015(0) && ZA1996A_0420() >= 101 &&
          ZA1996A_0420() <= 931)
        a = 12;
      if (MIGZA1() != ZA1996A_0014(0) && ZA1996A_0420() >= 101 &&
          ZA1996A_0420() <= 931)
        a = 20;
      if (ZA1996A_0420() <= 75)
        a = 30;
      if (ZA1996A_0420() == 998)
        a = 99;
      if (ZA1996A_0401() == 3)
        a = 0;
    } break;
    case dataset_id::es2001a: {
      if (ES2001A_0415() == ES2001A_0022(0))
        a = 12;
    } break;
    case dataset_id::co2005a: {
      if (CO2005A_0426() == 2 && CO2005A_0427() != CO2005A_0029(0))
        a = 20;
    } break;
    case dataset_id::pa1960a: {
      if (PA1960A_0434() == PA1960A_0031(0))
        a = 12;
    } break;
    case dataset_id::pa1970a: {
      if (PA1970A_0411() == PA1970A_0034(0) && PA1970A_0411() <= 9)
        a = 12;
      if (PA1970A_0412() == PA1970A_0035(0) && PA1970A_0412() <= 999)
        a = 11;
      if (PA1970A_0412() == 299 || PA1970A_0412() == 399 ||
          PA1970A_0412() == 499 || PA1970A_0412() == 599 ||
          PA1970A_0412() == 699 || PA1970A_0412() == 799 ||
          PA1970A_0412() == 899 || PA1970A_0412() == 999)
        a = 99;
    } break;
    case dataset_id::pa1980a: {
      if (PA1980A_0450() == PA1980A_0035(0))
        a = 12;
    } break;
    case dataset_id::pa2000a: {
      if (PA2000A_0453() == PA2000A_0034(0))
        a = 12;
    } break;
    case dataset_id::am2001a: {
      if (AM2001A_0417() == AM2001A_0018(0) && AM2001A_0417() > 900 &&
          AM2001A_0417() < 998)
        a = 10;
    } break;
    case dataset_id::gn1996a: {
      if (GN1996A_0413() != GN1996A_0029(0) && GN1996A_0413() >= 0 &&
          GN1996A_0413() <= 46)
        a = 20;
    } break;
    case dataset_id::kg1999a: {
      if (KG1999A_0418() != KG1999A_0026(0)) {
        if (KG1999A_0418() == 1901 && KG1999A_0026() >= 1267 &&
                KG1999A_0026() <= 1701 ||
            KG1999A_0418() >= 2205 && KG1999A_0418() <= 2406 &&
                KG1999A_0026() >= 2205 && KG1999A_0026() <= 2406 ||
            KG1999A_0418() >= 3204 && KG1999A_0418() <= 3422 &&
                KG1999A_0026() >= 3204 && KG1999A_0026() <= 3422 ||
            KG1999A_0418() >= 4210 && KG1999A_0418() <= 4401 &&
                KG1999A_0026() >= 4210 && KG1999A_0026() <= 4401 ||
            KG1999A_0418() >= 5214 && KG1999A_0418() <= 5419 &&
                KG1999A_0026() >= 5214 && KG1999A_0026() <= 5419 ||
            KG1999A_0418() >= 6207 && KG1999A_0418() <= 6401 &&
                KG1999A_0026() >= 6207 && KG1999A_0026() <= 6401 ||
            KG1999A_0418() >= 7215 && KG1999A_0418() <= 7401 &&
                KG1999A_0026() >= 7215 && KG1999A_0026() <= 7401 ||
            KG1999A_0418() >= 8203 && KG1999A_0418() <= 8414 &&
                KG1999A_0026() >= 8203 && KG1999A_0026() <= 8414)
          a = 12;
      } else if (KG1999A_0416() == 9)
        a = 99;
    } break;
    case dataset_id::mn2000a: {
      if (MN2000A_0413() == MN2000A_0027(0) && MN2000A_0413() >= 1 &&
          MN2000A_0413() <= 22)
        a = 10;
    } break;
    case dataset_id::ro1977a: {
      if (RO1977A_0404() == RO1977A_0018(0) && RO1977A_0404() >= 3 &&
          RO1977A_0404() <= 40)
        a = 10;
    } break;
    case dataset_id::za2007a: {
      if (ZA2007A_0421() == ZA2007A_0016(0) && ZA2007A_0421() >= 1 &&
          ZA2007A_0421() <= 9)
        a = 10;
    } break;
    case dataset_id::cu2002a: {
      if (CU2002A_0411() == 3 && CU2002A_0413() == CU2002A_0020(0))
        a = 12;
      if (CU2002A_0411() == 3 && CU2002A_0413() >= 1 && CU2002A_0413() <= 15 &&
          CU2002A_0413() != CU2002A_0020(0))
        a = 20;
      if (CU2002A_0411() == 3 && CU2002A_0412() >= 2 && CU2002A_0412() <= 990)
        a = 30;
    } break;
    case dataset_id::ml1998a: {
      if ((ML1998A_0417() >= 11 && ML1998A_0417() <= 74 ||
           ML1998A_0417() == 91) &&
          ML1998A_0417() == ML1998A_0030(0))
        a = 11;
      if (ML1998A_0417() >= 81 && ML1998A_0417() <= 84 && ML1998A_0029(0) == 8)
        a = 10;
      if (ML1998A_0417() >= 11 && ML1998A_0417() <= 91 &&
          (ML1998A_0417() - ML1998A_0417() % 10) / 10 != ML1998A_0029(0))
        a = 20;
    } break;
    case dataset_id::lc1980a: {
      if (LC1980A_0413() <= 12 && LC1980A_0413() == LC1980A_0021(0))
        a = 10;
    } break;
    case dataset_id::lc1991a: {
      if (LC1991A_0423() >= 1 && LC1991A_0423() <= 12 && LC1991A_0419() >= 1 &&
          LC1991A_0419() <= 91)
        a = 99;
      if (LC1991A_0423() == 0 && LC1991A_0419() >= 1 && LC1991A_0419() <= 91)
        a = 30;
      if (LC1991A_0423() >= 1 && LC1991A_0423() <= 12 &&
          LC1991A_0423() == LC1991A_0019(0))
        a = 10;
    } break;
    case dataset_id::kh1998a: {
      if (KH1998A_0427() <= 24 && KH1998A_0427() != KH1998A_0019(0))
        a = 11;
      if (KH1998A_0426() <= 2401 && KH1998A_0426() != KH1998A_0020(0))
        a = 12;
    } break;
    case dataset_id::kh2008a: {
      if (KH2008A_0409() < 93 && KH2008A_0410() == KH2008A_0020(0) &&
          KH2008A_0409() == KH2008A_0019(0))
        a = 11;
      if (KH2008A_0409() < 93 && KH2008A_0410() != KH2008A_0020(0) &&
          KH2008A_0409() == KH2008A_0019(0))
        a = 12;
    } break;
    case dataset_id::eg2006a: {
      if (EG2006A_0425() == 99 && EG2006A_0421() == 99)
        a = 0;
    } break;
    case dataset_id::jm1982a: {
      if (JM1982A_0412() < 98 && JM1982A_0412() == JM1982A_0406())
        a = 10;
    } break;
    case dataset_id::jm1991a: {
      if (JM1991A_0427() <= 14 && JM1991A_0427() == JM1991A_0022(0))
        a = 10;
    } break;
    case dataset_id::jm2001a: {
      if (JM2001A_0426() <= 14 && JM2001A_0426() == JM2001A_0031(0))
        a = 10;
    } break;
    case dataset_id::mw2008a: {
      if (MW2008A_0416() <= 315 && MW2008A_0416() == MW2008A_0022(0))
        a = 10;
    } break;
    case dataset_id::sl2004a: {
      if (SL2004A_0439() <= 42 && SL2004A_0439() == SL2004A_0018(0))
        a = 12;
      if (SL2004A_0439() <= 42 && SL2004A_0409() == SL2004A_0019(0))
        a = 11;
    } break;
    case dataset_id::ma2004a: {
      a = 20;
      if (MA2004A_0445() == MA2004A_0021(0) && MIGMA1() == GEO2B_MA(0))
        a = 11;
      else if (MA2004A_0445() == 90)
        a = 11;
      else if (MA2004A_0445() == MA2004A_0021(0) && MIGMA1() != GEO2B_MA(0))
        a = 12;
      if (MIGMA1() == 90000)
        a = 30;
      if (MA2004A_0445() == 99)
        a = 99;
    } break;
    case dataset_id::sv1992a: {
      if (SV1992A_0443() == SV1992A_0024(0))
        a = 11;
      if (SV1992A_0443() < 1500 && SV1992A_0444() != SV1992A_0023(0))
        a = 20;
    } break;
    case dataset_id::sv2007a: {
      if (SV2007A_0475() == 2 && SV2007A_0476() == SV2007A_0031(0))
        a = 11;
      if (SV2007A_0475() == 2 && SV2007A_0474() != SV2007A_0027(0))
        a = 20;
    } break;
    case dataset_id::id1980a: {
      if (ID1980A_0412() == ID1980A_0019(0))
        a = 10;
    } break;
    case dataset_id::id1985a: {
      if (ID1985A_0411() == ID1985A_0016(0))
        a = 12;
    } break;
    case dataset_id::id1995a: {
      if (ID1995A_0418() == ID1995A_0016(0))
        a = 12;
    } break;
    case dataset_id::id2005a: {
      if (ID2005A_0412() == ID2005A_0016(0))
        a = 12;
    } break;
    case dataset_id::uy1963a: {
      if (UY1963A_0408() == UY1963A_0032(0))
        a = 10;
    } break;
    case dataset_id::uy2006a: {
      if (UY2006A_0743() == UY2006A_0026(0))
        a = 10;
      if (UY2006A_0740() == 1)
        a = 10;
      if (UY2006A_0742() == 2)
        a = 30;
    } break;
    case dataset_id::br2010a: {
      if (BR2010A_0423() == 99 && BR2010A_0404() >= 5 && BR2010A_0422() == 2)
        a = 30;
      if (BR2010A_0423() < 98 && BR2010A_0423() == BR2010A_0022(0))
        a = 12;
    } break;
    case dataset_id::cm1976a: {
      if (CM1976A_0412() == 99999)
        a = 11;
      if (CM1976A_0412() == 99998 || CM1976A_0412() == 99997)
        a = 99;
      if (CM1976A_0412() < 10000)
        a = 30;
      if (CM1976A_0412() > 10000 && CM1976A_0412() < 99997 &&
          (CM1976A_0412() - CM1976A_0412() % 100) / 100 == CM1976A_0035(0))
        a = 11;
      if (CM1976A_0412() > 10000 && CM1976A_0412() < 99997 &&
          (CM1976A_0412() - CM1976A_0412() % 100) / 100 != CM1976A_0035(0) &&
          (CM1976A_0412() - CM1976A_0412() % 10000) / 10000 == CM1976A_0034(0))
        a = 12;
      if (CM1976A_0412() > 10000 && CM1976A_0412() < 99997 &&
          (CM1976A_0412() - CM1976A_0412() % 10000) / 10000 != CM1976A_0034(0))
        a = 20;
    } break;
    case dataset_id::cm1987a: {
      if (CM1987A_0432() < 10 && CM1987A_0431() == CM1987A_0023(0))
        a = 11;
      if (CM1987A_0432() < 10 && CM1987A_0431() != CM1987A_0023(0) &&
          CM1987A_0432() == CM1987A_0022(0))
        a = 12;
      if (CM1987A_0432() < 10 && CM1987A_0432() != CM1987A_0022(0))
        a = 20;
    } break;
    case dataset_id::cm2005a: {
      if (CM2005A_0526() < 97 && CM2005A_0526() == CM2005A_0023(0))
        a = 11;
      if (CM2005A_0526() < 97 && CM2005A_0526() != CM2005A_0023(0) &&
          CM2005A_0527() == CM2005A_0022(0))
        a = 12;
      if (CM2005A_0526() < 97 && CM2005A_0527() != CM2005A_0022(0))
        a = 20;
    } break;
    case dataset_id::ht1971a: {
      if (a != 99 && HT1971A_0428() < 98 && HT1971A_0428() == HT1971A_0024(0))
        a = 11;
      if (a != 99 && HT1971A_0428() < 98 && HT1971A_0428() != HT1971A_0024(0) &&
          HT1971A_0429() == HT1971A_0023(0))
        a = 12;
      if (a != 99 && HT1971A_0428() < 98 && HT1971A_0429() != HT1971A_0023(0))
        a = 20;
    } break;
    case dataset_id::pa2010a: {
      if (PA2010A_0425() > 900 && PA2010A_0425() < 99998 &&
          (PA2010A_0425() - PA2010A_0425() % 1000) / 1000 != PA2010A_0127(0))
        a = 20;
      if (PA2010A_0425() > 900 && PA2010A_0425() < 99998 &&
          PA2010A_0425() / 10 == PA2010A_0023(0))
        a = 11;
    } break;
    case dataset_id::ml2009a: {
      if ((ML2009A_0416() == 10 || ML2009A_0416() == 20 ||
           ML2009A_0416() == 30 || ML2009A_0416() == 40 ||
           ML2009A_0416() == 50 || ML2009A_0416() == 60 ||
           ML2009A_0416() == 70 ||
           ML2009A_0416() >= 80 && ML2009A_0416() <= 84) &&
          (ML2009A_0416() - ML2009A_0416() % 10) / 10 == ML2009A_0022(0))
        a = 10;
      if ((ML2009A_0416() >= 11 && ML2009A_0416() <= 17 ||
           ML2009A_0416() >= 21 && ML2009A_0416() <= 27 ||
           ML2009A_0416() >= 31 && ML2009A_0416() <= 37 ||
           ML2009A_0416() >= 41 && ML2009A_0416() <= 47 ||
           ML2009A_0416() >= 51 && ML2009A_0416() <= 57 ||
           ML2009A_0416() >= 61 && ML2009A_0416() <= 67 ||
           ML2009A_0416() >= 71 && ML2009A_0416() <= 77 ||
           ML2009A_0416() >= 81 && ML2009A_0416() <= 84) &&
          ML2009A_0416() == ML2009A_0023(0))
        a = 11;
      if (ML2009A_0416() >= 90 && ML2009A_0416() <= 96 && ML2009A_0023(0) == 91)
        a = 11;
      if (ML2009A_0416() >= 10 && ML2009A_0416() <= 96 &&
          (ML2009A_0416() - ML2009A_0416() % 10) / 10 != ML2009A_0022())
        a = 20;
    } break;
    case dataset_id::am2011a: {
      if (AM2011A_0419() == AM2011A_0021(0) && AM2011A_0419() > 900 &&
          AM2011A_0419() <= 911)
        a = 10;
    } break;
    case dataset_id::py1962a: {
      if (PY1962A_0420() == PY1962A_0025(0) && PY1962A_0420() <= 16)
        a = 10;
    } break;
    case dataset_id::es2011a: {
      if (ES2011A_0416() >= 1 && ES2011A_0416() <= 52) {
        if (ES2011A_0416() == ES2011A_0022(0))
          a = 12;
        if (ES2011A_0417() == ES2011A_0023(0))
          a = 11;
      }
    } break;
    case dataset_id::za2011a: {
      if (ZA2011A_0422() >= 1 && ZA2011A_0422() <= 9) {
        if (ZA2011A_0422() == ZA2011A_0078(0))
          a = 12;
        if (ZA2011A_0486() == ZA2011A_0079(0))
          a = 11;
        if (ZA2011A_0486() == 998 && a == 12)
          a = 10;
      }
    } break;
    case dataset_id::ir2011a: {
      if ((IR2011A_0418() == 3 || IR2011A_0418() == 4 || IR2011A_0418() == 6) &&
          IR2011A_0458() != IR2011A_0021(0))
        a = 20;
    } break;
    case dataset_id::pl2002a: {
      if (PL2002A_0438() == 1 && PL2002A_0439() != PL2002A_0021(0))
        a = 20;
    } break;
    case dataset_id::by2009a: {
      if (BY2009A_0412() == 112 && BY2009A_0413() <= 7 &&
          BY2009A_0413() == BY2009A_0021(0))
        a = 10;
    } break;
    case dataset_id::uy1963x: {
      if (UY1963X_0408() == UY1963X_0032(0))
        a = 10;
    } break;
    case dataset_id::uy2011a: {
      if (UY2011A_0433() == 0 && UY2011A_0429() == 8)
        a = 99;
    } break;
    case dataset_id::uy2011x: {
      if (UY2011X_0433() == 0 && UY2011X_0429() == 8)
        a = 99;
    } break;
    case dataset_id::bj1979a: {
      if (BJ1979A_0409() >= 1 && BJ1979A_0409() <= 12 &&
          BJ1979A_0409() == BJ1979A_0023(0))
        a = 12;
      if (BJ1979A_0409() >= 1 && BJ1979A_0409() <= 12 &&
          BJ1979A_0410() == BJ1979A_0024(0))
        a = 11;
      if (BJ1979A_0410() == 998)
        a = 99;
    } break;
    case dataset_id::bj1992a: {
      if (BJ1992A_0431() >= 1 && BJ1992A_0431() <= 12 &&
          BJ1992A_0431() == BJ1992A_0022(0))
        a = 12;
      if (BJ1992A_0431() >= 1 && BJ1992A_0431() <= 12 &&
          BJ1992A_0415() == BJ1992A_0023(0))
        a = 11;
      if (BJ1992A_0415() == 998)
        a = 99;
    } break;
    case dataset_id::bj2002a: {
      if (BJ2002A_0417() >= 1 && BJ2002A_0417() <= 12 &&
          BJ2002A_0417() == BJ2002A_0022(0))
        a = 12;
      if (BJ2002A_0417() >= 1 && BJ2002A_0417() <= 12 &&
          BJ2002A_0418() == BJ2002A_0023(0))
        a = 11;
      if (BJ2002A_0417() == BJ2002A_0022(0) &&
          (BJ2002A_0418() == 998 || BJ2002A_0418() == 10 ||
           BJ2002A_0418() == 20 || BJ2002A_0418() == 30 ||
           BJ2002A_0418() == 40 || BJ2002A_0418() == 50 ||
           BJ2002A_0418() == 60 || BJ2002A_0418() == 70 ||
           BJ2002A_0418() == 80 || BJ2002A_0418() == 90 ||
           BJ2002A_0418() == 100 || BJ2002A_0418() == 110 ||
           BJ2002A_0418() == 120))
        a = 10;
    } break;
    case dataset_id::bj2013a: {
      if (BJ2013A_0418() >= 1 && BJ2013A_0418() <= 12 &&
          BJ2013A_0418() == BJ2013A_0021(0))
        a = 12;
      if (BJ2013A_0418() >= 1 && BJ2013A_0418() <= 12 &&
          BJ2013A_0419() == BJ2013A_0022(0))
        a = 11;
      if (BJ2013A_0418() == BJ2013A_0021(0) &&
          (BJ2013A_0419() == 10 || BJ2013A_0419() == 20 ||
           BJ2013A_0419() == 30 || BJ2013A_0419() == 40 ||
           BJ2013A_0419() == 50 || BJ2013A_0419() == 60 ||
           BJ2013A_0419() == 70 || BJ2013A_0419() == 80 ||
           BJ2013A_0419() == 90 || BJ2013A_0419() == 100 ||
           BJ2013A_0419() == 110 || BJ2013A_0419() == 120))
        a = 10;
    } break;
    case dataset_id::rw2012a: {
      if (RW2012A_0468() >= 1 && RW2012A_0468() < 7 &&
          RW2012A_0021() == RW2012A_0468())
        a = 10;
      if (RW2012A_0468() >= 1 && RW2012A_0468() < 7 &&
          RW2012A_0021() != RW2012A_0468())
        a = 20;
      if (RW2012A_0468() == 7)
        a = 30;
      if (RW2012A_0468() == 8)
        a = 99;
      if (RW2012A_0468() >= 1 && RW2012A_0468() < 7 &&
          RW2012A_0021() == RW2012A_0468() &&
          RW2012A_0022() == RW2012A_0409() && RW2012A_0409() < 300)
        a = 11;
      if (RW2012A_0468() >= 1 && RW2012A_0468() < 7 &&
          RW2012A_0021() == RW2012A_0468() &&
          RW2012A_0022() != RW2012A_0409() && RW2012A_0409() < 300)
        a = 12;
    } break;
    case dataset_id::kh2004a: {
      if (KH2004A_0411() >= 102 && KH2004A_0411() <= 2499 &&
          KH2004A_0411() != KH2004A_0020(0))
        a = 12;
      if (KH2004A_0411() == 999 || KH2004A_0411() == 1199 ||
          KH2004A_0411() == 1399 || KH2004A_0411() == 1699 ||
          KH2004A_0411() == 1999 || KH2004A_0411() == 2299 ||
          KH2004A_0411() == 2399 || KH2004A_0411() == 2499 ||
          KH2004A_0411() == 9998)
        a = 99;
      if (KH2004A_0439() >= 1 && KH2004A_0439() <= 24 &&
          KH2004A_0439() != KH2004A_0019(0))
        a = 20;
    } break;
    case dataset_id::kh2013a: {
      if (KH2013A_0412() == KH2013A_0019(0) &&
          KH2013A_0413() == KH2013A_0020(0))
        a = 11;
      if (KH2013A_0413() == 1699 || KH2013A_0413() == 9998)
        a = 99;
      if (KH2013A_0412() != KH2013A_0019(0) && KH2013A_0412() >= 1 &&
          KH2013A_0412() <= 24)
        a = 20;
    } break;
    case dataset_id::gt1964a: {
      if (GT1964A_0415() != GT1964A_0020(0) &&
          GT1964A_0415() >= 1 & GT1964A_0415() <= 22)
        a = 20;
    } break;
    case dataset_id::gt1981a: {
      if (GT1981A_0422() == GT1981A_0027(0) && GT1981A_0423() <= 2299 &&
          GT1981A_0423() == GT1981A_0028(0))
        a = 11;
      if (GT1981A_0422() == GT1981A_0027(0) && GT1981A_0423() <= 2299 &&
          (GT1981A_0423() == 199 || GT1981A_0423() == 299 ||
           GT1981A_0423() == 399 || GT1981A_0423() == 499 ||
           GT1981A_0423() == 599 || GT1981A_0423() == 699 ||
           GT1981A_0423() == 799 || GT1981A_0423() == 899 ||
           GT1981A_0423() == 999 || GT1981A_0423() == 1099 ||
           GT1981A_0423() == 1199 || GT1981A_0423() == 1299 ||
           GT1981A_0423() == 1399 || GT1981A_0423() == 1499 ||
           GT1981A_0423() == 1599 || GT1981A_0423() == 1699 ||
           GT1981A_0423() == 1799 || GT1981A_0423() == 1899 ||
           GT1981A_0423() == 1999 || GT1981A_0423() == 2099 ||
           GT1981A_0423() == 2199 || GT1981A_0423() == 2299))
        a = 99;
      if (GT1981A_0422() <= 22 && GT1981A_0422() != GT1981A_0027(0))
        a = 20;
    } break;
    case dataset_id::gt1994a: {
      if (GT1994A_0411() <= 22 && GT1994A_0411() != GT1994A_0021(0))
        a = 20;
      if (GT1994A_0413() <= 84)
        a = 30;
    } break;
    case dataset_id::tg2010a: {
      if (TG2010A_0423() == TG2010A_0020(0) &&
          TG2010A_0425() == TG2010A_0021(0))
        a = 11;
      if (TG2010A_0425() == 99 || TG2010A_0425() == 1999 ||
          TG2010A_0425() == 2999 || TG2010A_0425() == 3999 ||
          TG2010A_0425() == 4999 || TG2010A_0425() == 5999)
        a = 99;
      if (TG2010A_0423() != TG2010A_0020(0) && TG2010A_0423() <= 5)
        a = 20;
    } break;
    case dataset_id::sr2012a: {
      if (SR2012A_0450() >= 1 && SR2012A_0450() <= 10 &&
          SR2012A_0020(0) != SR2012A_0450())
        a = 20;
    } break;
    case dataset_id::za2016a: {
      if (ZA2016A_0428() >= 1 && ZA2016A_0428() <= 9 &&
          ZA2016A_0428() == ZA2016A_0154(0))
        a = 10;
      if (ZA2016A_0428() >= 1 && ZA2016A_0428() <= 9 &&
          ZA2016A_0428() == ZA2016A_0154(0) &&
          ZA2016A_0492() == ZA2016A_0155(0))
        a = 11;
      if (ZA2016A_0428() >= 1 && ZA2016A_0428() <= 9 &&
          ZA2016A_0428() == ZA2016A_0154(0) &&
          ZA2016A_0492() != ZA2016A_0155(0))
        a = 12;
      if (ZA2016A_0428() >= 1 && ZA2016A_0428() <= 9 &&
          ZA2016A_0428() != ZA2016A_0154(0))
        a = 20;
    } break;
    case dataset_id::gn2014a: {
      if (GN2014A_0414() >= 11 && GN2014A_0414() <= 86 &&
          GN2014A_0414() == GN2014A_0018(0))
        a = 10;
    } break;
    case dataset_id::cu2012a: {
      if (CU2012A_0417() >= 21 && CU2012A_0417() <= 40 &&
          CU2012A_0417() == CU2012A_0028(0))
        a = 10;
      if (CU2012A_0417() >= 21 && CU2012A_0417() <= 40 &&
          CU2012A_0417() == CU2012A_0028(0) &&
          CU2012A_0416() == CU2012A_0029(0))
        a = 11;
      if (CU2012A_0417() >= 21 && CU2012A_0417() <= 40 &&
          CU2012A_0417() == CU2012A_0028(0) &&
          CU2012A_0416() != CU2012A_0029(0))
        a = 12;
      if (CU2012A_0417() >= 21 && CU2012A_0417() <= 40 &&
          CU2012A_0417() != CU2012A_0028(0))
        a = 20;
      if (CU2012A_0417() == 97)
        a = 30;
    } break;
    case dataset_id::mm2014a: {
      if (MM2014A_0414() == 16)
        a = 0;
      if (MM2014A_0419() >= 1 && MM2014A_0419() <= 15 &&
          MM2014A_0419() == MM2014A_0414())
        a = 10;
      if (MM2014A_0419() >= 1 && MM2014A_0419() <= 15 &&
          MM2014A_0419() == MM2014A_0414() &&
          MM2014A_0420() == MM2014A_0415() &&
          (MM2014A_0415() != 1399 && MM2014A_0415() != 1503) &&
          (MM2014A_0420() != 1399 && MM2014A_0420() != 1503))
        a = 11;
      if (MM2014A_0419() >= 1 && MM2014A_0419() <= 15 &&
          MM2014A_0419() == MM2014A_0414() &&
          MM2014A_0420() != MM2014A_0415() &&
          (MM2014A_0415() != 1399 && MM2014A_0415() != 1503) &&
          (MM2014A_0420() != 1399 && MM2014A_0420() != 1503))
        a = 12;
      if (MM2014A_0419() >= 1 && MM2014A_0419() <= 15 &&
          MM2014A_0419() != MM2014A_0414())
        a = 20;
    } break;
    case dataset_id::ug2014a: {
      if (UG2014A_0472() >= 1 && UG2014A_0472() <= 4 &&
          UG2014A_0472() == UG2014A_0022(0))
        a = 10;
      if (UG2014A_0472() >= 1 && UG2014A_0472() <= 4 &&
          UG2014A_0472() == UG2014A_0022(0) &&
          UG2014A_0413() == UG2014A_0023(0))
        a = 11;
      if (UG2014A_0472() >= 1 && UG2014A_0472() <= 4 &&
          UG2014A_0472() == UG2014A_0022(0) &&
          UG2014A_0413() != UG2014A_0023(0))
        a = 12;
      if (UG2014A_0472() >= 1 && UG2014A_0472() <= 4 &&
          UG2014A_0472() != UG2014A_0022(0))
        a = 20;
    } break;
    }

    setData(a);
  }
};

    

Description

MIGRATEP indicates whether the person's most recent move (if any) was between minor administrative units, major units, or countries.

Comparability — Index

GENERAL
Belarus
Benin
Brazil
Cambodia
Colombia
Egypt
El Salvador
Guatemala
Guinea
Haiti
Indonesia
Jamaica
Laos
Mali
Mexico
Mongolia
Panama
Poland
Romania
Saint Lucia
South Africa
Spain
Suriname
Thailand
Uruguay
Venezuela

Comparability — General

Some samples significantly limit the universe of respondents who answered the question. Belarus 2009, Colombia 2005, South Africa 2007, and all Thailand samples limit the universe to persons who moved within the last five years; the Brazil 2010, Spain 1991, and South Africa 2011 samples limit it to persons who moved within the last ten years; and Poland 2002 includes moves only within the past 13 years.

This variable is generally comparable across samples at the first digit: movement between major administrative units or countries. Some samples provide further detail at the second digit, recording movement between minor units within major administrative units.

The major administrative units are as follows:

- Region: Mali, Uganda
- County: Romania
- Department: Colombia, El Salvador, Guatemala, Haiti, Paraguay, Uruguay, Benin
- District: Malawi, Saint Lucia, Suriname
- Governorate: Egypt
- Municipality: Trinidad and Tobago
- Parish: Jamaica
- Prefecture: Guinea
- Province: Armenia, Benin, Cambodia, Cameroon, Chile, Costa Rica, Cuba, Ecuador, Indonesia, Iran, Laos, Mongolia, Panama, Philippines, Poland, Rwanda, South Africa, Spain, Thailand
- Region: Belarus, Kyrgyz Republic, Morocco, Slovenia, Togo
- State: Brazil, France, India, Mexico, Venezuela

The minor administrative units are:

- Arrondissement: Haiti
- Canton: Costa Rica, El Salvador
- Circle: Mali
- Commune: Benin
- Department: Cameroon
- District: Benin, Cambodia, India, Kyrgyz Republic, Laos, Panama, Rwanda, Uganda
- Locality: Uruguay
- Magisterial District: South Africa
- Municipality: Brazil, Colombia, Cuba, Ecuador, France, Guatemala, Philippines, Slovenia, Spain, Venezuela
- Prefecture: Togo
- Province: Morocco
- Regency/Municipality: Indonesia
- Sub-province: Iran

Some samples offer extra detail in the source variables that distinguish movers from non-movers at the lowest geographic level identified in MIGRATEP.

Note: the universe for some samples is restricted to movers within some number of years prior to the census. These samples will over-estimate migrants if not interpreted correctly.

The coding for MIGRATEP corresponds to migration status variables available in other samples: MIGRATE5, MIGRATEC, MIGRATE1, and MIGRATE0. Those variables are conceptually similar to MIGRATEP, but differ in terms of their reference periods.

Comparability — Belarus [top]

The 1999 sample indicates the previous residence for people who have ever moved. The 2009 sample only includes responses for persons who changed regions within the last 5 years.

Comparability — Benin [top]

The census questions asked about the province and district of previous residence. The responses available for 1979 and 1992 do not include cases with previous residence abroad, which are identified in 2002 and 2013.

In the 2002 and 2013 samples, persons are coded as "same major unit" if the province of current residence is the same of previous residence, but the district of previous residence is unknown.

Comparability — Brazil [top]

In 1960, persons who moved from their municipality of birth and subsequently returned to it are coded "same municipality," as if they had never migrated. From 1980 to 2010, persons who lived 10 or more years in their current municipality are coded "same municipality," regardless of where they may have lived before that time.

For the number of years the person resided in their current state, see MIGYRS1 and MIGYRS2.

Comparability — Cambodia [top]

The data are comparable apart from a minor universe difference. Some second-level units are not identifiable and are coded to unknown.

Comparability — Colombia [top]

Moves between municipalities refer to the full detail of Colombian municipalities, not to the recoded municipality groupings used in MIGCO3.

For the number of years the person resided in their current municipality, see MIGYRS1.

In 1964, moves between Cundinamarca and the Federal District do not count as migration.

Colombia 2005 limits the universe to persons who moved within the last five years. The other samples have no universe limitation.

Comparability — Egypt [top]

In 1996, the question is asked of all persons, but in 2006 the universe is limited to non-visitors. Although there are data on inter-district migration, there are too many cases of unknowns and redistricting to make it reliable -- detail can be found in the unharmonized source variables.

Comparability — El Salvador [top]

The samples are comparable except for some cases in the 1992 sample that did not indicate a municipality of previous residence, only a department. These cases are coded to the first digit only, as applicable.

Comparability — Guatemala [top]

There was no second level geographic identification for the 1964 sample, which only allowed for identifying moves between major units.

Comparability — Guinea [top]

The 1996 and 2014 samples do not contain second level of administrative geography.

Comparability — Haiti [top]

The sample does not identify persons living abroad, who are included in the "unknown" category.

Comparability — Indonesia [top]

The 1971, 1980 and 1990 samples only distinguish movements at the provincial level (major), whereas the 1985, 1995 and 2005 samples further distinguish regencies / municipalities (minor).

The 1995 census did not enumerate persons from Kalimantan, Sulawesi, Maluku, or Papua; the 2005 census did not enumerate persons from Aceh. Therefore, migrants to the non-enumerated regions will not be recorded.

Comparability — Jamaica [top]

The universe differs across different samples. In 1982, the question is asked of persons in private households and some group quarters, regardless of whether the person was local or foreign born. In 1991, the universe is limited to persons in private households and group quarters who were born in Jamaica. In 2001, the question is asked of all persons born in Jamaica.

There is a large number of unknown responses in the 1982 sample which may affect comparability.

Comparability — Laos [top]

For the 2015 sample, previous residence refers to previous residence within the last 12 months.

Comparability — Mali [top]

This variable is comparable across the 1998 and 2009 samples. The universe for the 1998 sample explicitly excludes visitors; however, the sample data available for 2009 does not include person records for visitors, so the universes are actually comparable.

Although the underlying source variables report previous residence at the minor administrative unit level, we were not able to preserve this level of detail in all cases. Circles within the Kidal region are not identified in the household geography variables. Persons who previously lived in Kidal and were enumerated in Kidal are coded as "same major administrative unit" in MIGRATEP. Additionally, the 2009 sample contained large numbers of cases where a region but not a circle of previous residence was identified. If these cases were enumerated in the same region that was reported as the region of previous residence, these cases are also coded as "same major administrative unit."

Persons who reported living in the district of Bamako previously and were enumerated there are coded as "same major, same minor administrative unit."

Comparability — Mexico [top]

This variable is comparable across Mexican samples. However, in 1970, persons whose previous residence was not reported cannot be identified; they are coded to "same state."

In 1960, persons who moved from their state of birth and subsequently returned to it are coded "same state", as if they had never migrated. Furthermore, a small proportion of cases in 1960 indicate that their current and previous state of residence are the same, which suggests that their most recent move was within a state and, thus, they are coded to "same major administrative unit."

For the number of years the person resided in their current state, see MIGYRS1.

Comparability — Mongolia [top]

Persons who moved from the place of birth and returned were to report it as migration only if they spent at least 6 months uninterrupted in the other location.

Comparability — Panama [top]

Persons who moved from a foreign country are not identified and are coded as unknown in 1980.

Comparability — Poland [top]

The universe of respondents includes only persons who moved since 1989 (in the past 13 years).

Comparability — Romania [top]

In 1992, persons who moved from their municipality of birth and subsequently returned to it are coded "same municipality", as if they had never migrated.

Comparability — Saint Lucia [top]

In 1980, the universe is limited to people born in Saint Lucia, and the question asks only about migration within Saint Lucia.

In 1991, questions about internal and international migration were asked separately and do not indicate which move was the most recent one. People who reported having lived abroad and reported never moving within Saint Lucia are coded as having last lived abroad. People who have both lived abroad and have lived elsewhere in Saint Lucia are coded as unknown. The underlying information can be obtained from the un-harmonized source variables.

Comparability — South Africa [top]

There is a major comparability issue: the 2007 data only pertain to persons who moved in the past five years; the 2011 data apply only to persons who moved within the past ten years. The 2016 sample does not have a similar temporal restriction, but the universe only includes persons with usual residence in South Africa.

The level of category detail differs as well: 1996, 2011, and 2016 identify moves at the second administrative level (districts), while the 2007 sample only identifies migration at the first level (provinces).

Comparability — Spain [top]

The universe changes significantly between 1991 and 2001. In 1991, only persons who changed municipalities within the last 10 years were asked the question. All persons were asked in 2001.

Comparability — Suriname [top]

The 2012 sample does not contain second level of administrative geography. People who previously resided in an unknown district in Suriname are considered as not reported/missing.

Comparability — Thailand [top]

In all samples the variable indicates previous residence only for persons who moved in the past 5 years. In 1970 and 1980, the question was asked only of persons age 5 and older. In 1990 and 2000 children under age 5 have responses.

Comparability — Uruguay [top]

In 1963, persons who resided outside the place of enumeration for less than six months were coded as having always lived in the locality or area. In 2011, persons who resided outside the place of enumeration for less than one year were coded as having always lived in the locality or area. For both samples, these persons are considered not migrants and are classified as resided previously either in the same major or minor administrative unit.

The 2006 sample was a survey and only a subset of the population was asked the migration question.

Comparability — Venezuela [top]

The 1981 sample does not identify foreign country, which must be included among unknowns.

Universe

  • Armenia 2001: All persons
  • Armenia 2011: All persons
  • Belarus 1999: All persons
  • Belarus 2009: Persons who moved to their current region in the last 5 years
  • Benin 1979: All persons
  • Benin 1992: Resident persons
  • Benin 2002: Resident persons
  • Benin 2013: Resident persons
  • Brazil 1960: All persons
  • Brazil 1970: All persons
  • Brazil 1980: All persons
  • Brazil 1991: All persons
  • Brazil 2000: All persons
  • Brazil 2010: Persons who changed municipalities in the last 10 years
  • Cambodia 1998: All persons
  • Cambodia 2004: All persons
  • Cambodia 2008: All persons
  • Cambodia 2013: All persons
  • Cambodia 2019: All persons
  • Cameroon 1976: All persons
  • Cameroon 1987: Persons in private households
  • Cameroon 2005: Residents
  • Chile 1960: All persons
  • Colombia 1964: All persons
  • Colombia 1973: All persons
  • Colombia 2005: Persons who moved in the last 5 years
  • Costa Rica 1963: All persons
  • Cuba 2002: All persons
  • Cuba 2012: All persons
  • Ecuador 1962: All persons
  • Ecuador 1974: All persons
  • Egypt 1996: All persons
  • Egypt 2006: Residents
  • El Salvador 1992: All persons
  • El Salvador 2007: All persons
  • Guatemala 1964: All persons
  • Guatemala 1981: All persons
  • Guatemala 1994: All persons
  • Guinea 1996: Residents
  • Guinea 2014: All persons
  • Haiti 1971: All persons
  • Indonesia 1971: All persons
  • Indonesia 1980: All persons
  • Indonesia 1985: All persons
  • Indonesia 1990: All persons
  • Indonesia 1995: All persons
  • Indonesia 2005: All persons
  • Iran 2011: All persons
  • Iraq 1997: All persons
  • Jamaica 1982: Persons in private households and some group quarters
  • Jamaica 1991: Persons in private households and some group quarters who were born in Jamaica
  • Jamaica 2001: Persons who were born in Jamaica
  • Kyrgyzstan 1999: All persons
  • Laos 2015: All persons
  • Malawi 2008: Residents
  • Mali 1998: Residents
  • Mali 2009: All persons
  • Mexico 1960: All persons
  • Mexico 1970: All persons
  • Mexico 1995: All persons
  • Mongolia 2000: All persons
  • Morocco 2004: All persons
  • Myanmar 2014: Persons in conventional households with usual residence in Myanmar
  • Panama 1960: All persons
  • Panama 1970: All persons
  • Panama 1980: Persons in non-indigenous dwellings
  • Panama 2000: All persons
  • Panama 2010: All persons
  • Paraguay 1962: All persons
  • Philippines 1990: Persons age 5+
  • Poland 2002: Persons who changed localities since 1989
  • Romania 1977: All persons
  • Romania 1992: All persons
  • Romania 2002: All persons
  • Romania 2011: All persons.
  • Rwanda 2012: All persons
  • Saint Lucia 1980: Persons born in Saint Lucia
  • Saint Lucia 1991: All persons
  • Slovenia 2002: All persons
  • South Africa 1996: Persons in private households
  • South Africa 2007: Persons in private households who moved in the last 5 years
  • South Africa 2011: Persons who moved in the past 10 years
  • South Africa 2016: Persons with usual residence in South Africa
  • Spain 1991: Persons age 10+
  • Spain 2001: All persons
  • Spain 2011: All persons
  • Suriname 2012: All persons
  • Thailand 1970: Persons age 5+ who moved in the last 5 years
  • Thailand 1980: Persons age 5+ who moved in the last 5 years
  • Thailand 1990: Persons who moved in the last 5 years
  • Thailand 2000: Persons who moved in the last 5 years
  • Togo 2010: Residents
  • Uganda 2014: Residents
  • Uruguay 1963: All persons
  • Uruguay 2006: Persons in the fourth sample trimester
  • Uruguay 2011: All persons
  • Venezuela 1971: All persons
  • Venezuela 1981: All persons
  • Venezuela 1990: All persons

Availability

  • Armenia: 2001, 2011
  • Belarus: 1999, 2009
  • Benin: 1979, 1992, 2002, 2013
  • Brazil: 1960, 1970, 1980, 1991, 2000, 2010
  • Cambodia: 1998, 2004, 2008, 2013, 2019
  • Cameroon: 1976, 1987, 2005
  • Chile: 1960
  • Colombia: 1964, 1973, 2005
  • Costa Rica: 1963
  • Cuba: 2002, 2012
  • Ecuador: 1962, 1974
  • Egypt: 1996, 2006
  • El Salvador: 1992, 2007
  • Guatemala: 1964, 1981, 1994
  • Guinea: 1996, 2014
  • Haiti: 1971
  • India: 1983, 1987, 1999
  • Indonesia: 1971, 1980, 1985, 1990, 1995, 2005
  • Iran: 2011
  • Iraq: 1997
  • Jamaica: 1982, 1991, 2001
  • Kyrgyzstan: 1999
  • Laos: 2015
  • Malawi: 2008
  • Mali: 1998, 2009
  • Mexico: 1960, 1970, 1995
  • Mongolia: 2000
  • Morocco: 2004
  • Myanmar: 2014
  • Panama: 1960, 1970, 1980, 2000, 2010
  • Paraguay: 1962
  • Philippines: 1990
  • Poland: 2002
  • Romania: 1977, 1992, 2002, 2011
  • Rwanda: 2012
  • Saint Lucia: 1980, 1991
  • Slovenia: 2002
  • South Africa: 1996, 2007, 2011, 2016
  • Spain: 1991, 2001, 2011
  • Suriname: 2012
  • Thailand: 1970, 1980, 1990, 2000
  • Togo: 2010
  • Uganda: 2014
  • Uruguay: 1963, 2006, 2011
  • Venezuela: 1971, 1981, 1990