Data Cart

Your data extract

0 variables
0 samples
View Cart
MIG1_P_IR
Province of previous residence, Iran; consistent boundaries, GIS

Codes and Frequencies



Loading Frequency Data...

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

Explore how IPUMS created this variable

Download


      class Mig1_p_ir : public Editor {

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

    long a = getRecoded();
    switch (dataSet) {
    case dataset_id::ir2006a: {
      if (IR2006A_0415() == 1 || IR2006A_0415() == 2)
        a = GEO1_IR(0);
      if (IR2006A_0415() == 9 && IR2006A_0412() == 2)
        a = GEO1_IR(0);
    } break;
    case dataset_id::ir2011a: {
      if (IR2011A_0418() == 1 || IR2011A_0418() == 2)
        a = GEO1_IR(0);
      if (IR2011A_0418() == 5)
        a = 364097;
      if (IR2011A_0418() == 7 || IR2011A_0418() == 8)
        a = 364098;
      if (IR2011A_0415() == 2 && IR2011A_0458() == 99)
        a = GEO1_IR(0);
    } break;
    }

    setData(a);
  }
};