From 24c6f389734011deb10eee4dc6e60ae2646e027d Mon Sep 17 00:00:00 2001 From: Mario G <63501500+gronert-m@users.noreply.github.com> Date: Wed, 6 Nov 2024 15:51:23 -0500 Subject: [PATCH] Update SINCO to ISCO process Include manual mapping of codes not in the correspondence table. --- .../MEX/ENOE/Correspondence_occup_ISCO.md | 4 +- .../MEX/ENOE/utilities/SINCO_11_ISCO_08.dta | Bin 0 -> 9819 bytes .../utilities/sinco_to_isco_correspondance.R | 75 ++++++++++++++++++ 3 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 Support/B - Country Survey Details/MEX/ENOE/utilities/SINCO_11_ISCO_08.dta diff --git a/Support/B - Country Survey Details/MEX/ENOE/Correspondence_occup_ISCO.md b/Support/B - Country Survey Details/MEX/ENOE/Correspondence_occup_ISCO.md index 63250728a..4e5b4c647 100644 --- a/Support/B - Country Survey Details/MEX/ENOE/Correspondence_occup_ISCO.md +++ b/Support/B - Country Survey Details/MEX/ENOE/Correspondence_occup_ISCO.md @@ -36,12 +36,14 @@ The most difficult case is the case in the red box. Here SINCO code `1524` descr ### Direct SINCO to ISCO mapping -In the easiest case, we use the SINCO to ISCO correspondence and create a map for every four-digit SINCO code, following the logic outlined above. Note that not all SINCO codes appear to have a correspondence. The case of SINCO code `2421` of biomedical engineers (red box in the image below) is described by INEGI as having no correspondence in ISCO. This code is therefore not mapped. +In the easiest case, we use the SINCO to ISCO correspondence and create a map for every four-digit SINCO code, following the logic outlined above. Note that not all SINCO codes appear to have a correspondence. The case of SINCO code `2421` of biomedical engineers (red box in the image below) is described by INEGI as having no correspondence in ISCO.

![](utilities/sinco_isco_ing_biomed.png)

+For these codes (38 instances) there is a manual mapping (in the [correspondence R code](utilities/sinco_to_isco_correspondance.R)) whenever feasible (29 instances). + ### Indirect CMO to ISCO mapping The more difficult case is for surveys between 2005 and 2012. Here we first use the mapping logic to map CMO codes to SINCO codes. This includes reducing the SINCO accuracy to achieve more certain matches. For example, in the image below, CMO code `6160` cannot be matched unique to a four-digit SINCO code so the mapping occurs to code `1710`. diff --git a/Support/B - Country Survey Details/MEX/ENOE/utilities/SINCO_11_ISCO_08.dta b/Support/B - Country Survey Details/MEX/ENOE/utilities/SINCO_11_ISCO_08.dta new file mode 100644 index 0000000000000000000000000000000000000000..098127c5816a72676b7b39d8a08521453dbb8b9e GIT binary patch literal 9819 zcmeI2&5qp05y#iDbI37A-vk8CEtz3|kqn3dfdBy(Hr9ci%OWs@(P|tmu<{Bs69ayS z0C|Hvfp30++>@Mg@r%S)`&Z4wb$hG$=$506J-_~_F=3>$;Phr4&LhRuh&;b!-*cdn+NVRN$^ z9`?@;54$U9^VM*^e|ccPm#=oe+?FRdk6%6s+mN0#`FD|>j5=%zj=4YpZ$FP{{1iJ@6Rvazxwrz!{z(q%lDrz-@`_B9lqQj@AuCh z4o}Zty*iwB?_Irj_1*WwW_4TGzSv{d?sWgf-Qz6z&HQ_Rdb9gqz1*MgUc4FG=Uu1h z%+VN5kH_=F{pqafGi>zM@cH8rWly^ge$$^`OX1gF*ld5h{mX0YIcyfCNx6r=9-dA$ z^>nuOHRQcr^3!@ia&H|L>mgIHPMV89?bdIlz4gFb5B#4z;3j}eQ4e=7_Q(C*`Eca8 zxxYK@hRu)eJZH#ao|=Bbtm*9t3UbHc2#kg&vf~fj2wS5Idy^cN1s)57$7zLgg=KYU zY`?&MG1>YMA~@@QA>?h-m_8wtCdFRq5os})yx1hL*&CY-HhZBpF`7Kqt}y!t(}(K@ zopis+I_IB+F(n&+UfGjZ_GIh{&Yrxor>yM3+RC1?vZt)5l{XYy0Cc{%Sr- zIp8BlmpfLkQXbH4Kin-PqW%c@yQ1S?d}MU|+c!EgJ~t@yG1G6g^n)BQ5h zjV_-=y7zBpH66qFCH_ty!neZ2w^%%LN|BPY^-^Ei(WRc8|8kLvcKXtA*uvIR+#XB! z4$1PB{zZzIe7pm;cp?sL{-%FPN~!!3w_x)Ry+>M>qX)3(7kQpPx7=|2Efw$fi(QRV zY`wiDr5Y0eVr24iT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sh_9ZF7dq{rFj_U_X)gvs4%l@ zji>PHdU`G0XOVX+`6%gY`IG5yim%7%;Sjv!59y!ViXMw$v8drYOh4InWQ||n6SYF@NxUVtm9i8lu-w(|5A^XYnp#6NtRG7(UytaNX zbZLlAfBHA?KQHHv&`avIUkjFpcbf2GKMz~-K53rspeN#?{S{0dh;$Hg;@`-2a-TGlO{n~OkosSRlTg}V2`+p8{cLnYLll=gN?&j10 literal 0 HcmV?d00001 diff --git a/Support/B - Country Survey Details/MEX/ENOE/utilities/sinco_to_isco_correspondance.R b/Support/B - Country Survey Details/MEX/ENOE/utilities/sinco_to_isco_correspondance.R index a738eed5b..b9dcb622e 100644 --- a/Support/B - Country Survey Details/MEX/ENOE/utilities/sinco_to_isco_correspondance.R +++ b/Support/B - Country Survey Details/MEX/ENOE/utilities/sinco_to_isco_correspondance.R @@ -51,6 +51,20 @@ df <- df[!(df$...1 < 1000 & !is.na(df$...1)),] # Fill ISCO description down, Drop when SINCO has no correspondence with ISCO df <- df %>% fill(...4, .direction = "down") + +# There are odd cases that require manual treatment, set them aside + +# First when there is a note instead of a correspondence code +odd_nota <- df[(df$...4 %in% c("Nota: clasifica a los supervisores junto a los trabajadores que supervisa")),] %>% + # Keep only four digit codes, three digit ones should go + filter(...1 > 999) + +# Then for cases defined as "without correspondence" +odd_no_correspond <- df[(df$...4 %in% c("No tiene correspondencia")),] %>% + # Keep only four digit codes + filter(...1 > 999) + +# Once saved, focus df only on what has correspondence df <- df[!(df$...4 %in% c("No tiene correspondencia", "Nota: clasifica a los supervisores junto a los trabajadores que supervisa")),] @@ -176,4 +190,65 @@ concord <- bind_rows(match_1, match_2, match_3, match_4) %>% isco = str_pad(isco, 4, pad = "0", side = "right")) +#=========================================================================# +# Step 7 - Add manual matches --------------------------------------------- +#=========================================================================# + +# We manually assign codes to the codes present in SINCO but for which the +# correspondence table gives us no information. This is based on SINCO +# descriptions (1) and ISCO 08 ones (2) + +# Links below as of 2024/11/06 +# (1) http://internet.contenidos.inegi.org.mx/contenidos/productos/prod_serv/contenidos/espanol/bvinegi/productos/metodologias/est/sinco_2011.pdf +# (2) https://www.ilo.org/sites/default/files/wcmsp5/groups/public/@dgreports/@dcomm/@publ/documents/publication/wcms_172572.pdf + +orphan_sinco_codes <- as.character(c(odd_nota$...1, odd_no_correspond$...1)) +orphan_isco_codes <- c("5152", # Supervisors of housework, same as workers + "5410", # Supervisors of protective service workers (psw) as psw + "6100", # Agro/fish supervisor as market ag workers + "6200", # Fish/aquaculture supervisor as market forest, fish + "7200", # Metalwork supervisors as metalworkers + "", # Don't have a good one, should be few people + "7510", # Food process (fp) supervisors as fp workers + "7310", # Handicraft supervisors as handicraft + "", # Don't have a good one, should be few people + "1100", # Other presidents, CEO as Chie Executives + "1300", # Public utilities Managers as Production Managers + "1300", # Coordinator public utilities as Production Managers + "1300", # Other coordinators as Production Managers + "1300", # Other coordinators in ITC PM + "", # Other directors, no code, should be few + "2654", # Set designers + "2300", # Alphabetisers as teachers + "2300", # Bilingual (indigenous) teacher as teacher + "2300", # Other teachers n.e.c. as teacher + "2200", # Biomedical engineers as health professionals + "", # Don't have a good one, should be few people + "3130", # Electrical technician supervisors as process control techs + "7400", # Electrical tecs n.e.c.as Eletrical Workers + "5312", # Auxiliary teaching as teachers' aides + "", # Too vague + "", # Too vague + "5249", # Mobile goods rental as sales n.e.c. (example is rental salesperson) + "5200", # Other sales workers as generic sales workers + "6100", # Other ag workers as market ag workers + "6100", # Other ag workers as market ag workers + "6100", # Other ag workers as market ag workers + "6200", # Other fish sector workers as market fishery + "6200", # Other fishery, water workers as market fishery + "", # Too vague + "8300", # Other drivers as drivers, mobile plant operators + "9100", # Car handler on tips as cleaners and helpers + "", # Unclear + "") # Too vague + +orphan_df <- data.frame(sinco = orphan_sinco_codes, isco = orphan_isco_codes, match = 999) %>% + filter(isco != "") + +#=========================================================================# +# Step 8 - Combine manual, save ------------------------------------------- +#=========================================================================# + +concord <- bind_rows(concord, orphan_df) + write_dta(concord, path_out)