isco88_egp <- function(data, detail = 0) {
# Recode ISCO88 to EGP using Ganzebooms' code
# Code the simple version, based on 4 digit ISCO88 values
data$egp[data$isco88 %in% c(1000, 2000, 1100, 2100, 1110, 2110, 1120, 2111, 2112,
2113, 2114, 2120, 2121, 1200, 2122, 1210, 2130, 1220, 2131, 1222, 1223,
2140, 1224, 2141, 1225, 2142, 1226, 2143, 1227, 2144, 1228, 2145, 1229,
2146, 1230, 2147, 1231, 1232, 2149, 1233, 2200, 3143, 1234, 2210, 3144,
1235, 2211, 1236, 2212, 1237, 2213, 1239, 2220, 2221, 1250, 2222, 1251,
2223, 2224, 2229, 2310, 2350, 2351, 2352, 2400, 2411, 2420, 2421, 2422,
2429, 2440, 2441, 2442, 2443, 2445)] <- 1 # CLASS 1
data$egp[data$isco88 %in% c(3000, 3100, 3110, 3111, 1130, 3112, 1140, 3113, 1141,
3114, 1142, 3115, 5121, 1143, 3116, 3117, 3118, 3119, 2132, 3120, 2139,
3121, 3122, 3123, 3130, 3131, 3132, 3133, 3139, 5150, 3140, 5151, 2148,
3141, 5152, 3142, 3145, 3150, 3151, 3152, 1240, 3200, 3210, 3211, 1252,
3212, 1300, 3213, 1310, 2230, 3220, 2300, 3221, 1312, 3222, 1313, 2320,
3223, 1314, 2321, 3224, 1315, 2322, 3225, 1316, 2323, 3226, 1317, 2330,
3227, 1318, 2331, 3228, 1319, 2332, 3229, 2340, 3240, 2359, 3241, 3242,
2410, 2412, 2419, 3400, 3410, 3411, 2430, 3412, 2431, 3413, 2432, 3414,
3415, 3416, 3417, 3419, 2444, 3420, 3421, 2446, 3422, 2450, 3423, 2451,
3429, 2452, 2453, 3431, 2454, 3432, 2455, 2460, 3434, 3440, 3441, 3442,
3443, 3444, 3449, 3450, 3451, 3470, 3471, 3472, 3473, 3474,
3475)] <- 2 # CLASS 2
# EGP CLASS 3
data$egp[data$isco88 %in% c(4000, 4100, 4122, 9100, 4110, 9110, 4111, 9111, 4112, 9112,
4113, 9113, 4114, 4115, 4120, 4121, 3230, 3231, 3232, 3300, 3310, 3320, 3330,
3340, 3430, 3433, 3439, 3460, 3480)] <- 3
# EGP CLASS 4
data$egp[data$isco88 %in% c(5000, 5100, 5110, 5111, 5112, 5113, 5120, 4130, 5131,
4131, 4132, 5133, 4133, 4140, 4141, 4143, 4144, 4190, 4200, 4210, 4211,
4212, 4213, 4214, 4215, 4220, 4221, 5200, 4222, 5210, 4223, 5220, 5230)] <- 4
data$egp[data$isco88 %in% c(3452, 7510)] <- 7 # CLASS 7
data$egp[data$isco88 %in% c(7000, 7120, 5122, 7124, 7129, 7130, 7132, 5140, 7133, 5141, 7134, 5143, 7136, 8150, 7137, 8151, 7140, 8152, 7141, 8153, 8154, 8155, 5161, 7200, 8159,
5162, 7210, 8160, 7211, 8161, 5164, 7212, 8162, 7213, 8163, 7214, 8170, 7215, 8171, 7216, 8172, 7220, 7221, 7222, 7223, 7224, 7230, 7231, 7232, 7233, 7240, 7241, 7242,
7243, 7244, 7245, 7300, 7310, 7311, 7312, 7313, 7323, 7324, 7340, 7341, 7342, 7343, 7344, 7345, 7346, 7400, 7410, 7411, 7412, 7413, 7414, 7415, 7416, 7420, 7422, 8311,
7423, 7430, 7433, 7434, 7435, 7436, 8332, 7437, 8333, 7440, 7441, 7442, 7500, 7520)] <- 8 # CLASS 8
data$egp[data$isco88 %in% c(8000, 9000, 7100, 8100, 7110, 8110, 7111, 8111, 7112, 8112, 7113, 8113, 8120, 9120, 7121, 8121, 9130, 7122, 8122, 9131, 5123, 7123, 8123, 9132, 5130,
8124, 9133, 8130, 9140, 5132, 8131, 9141, 7131, 8139, 9142, 5139, 8140, 9150, 8141, 9151, 8142, 9152, 4142, 5142, 7135, 8143, 9153, 9160, 5149, 9161, 9162, 9200, 7142,
5160, 7143, 5163, 9300, 9310, 5169, 9311, 9312, 9313, 9320, 8200, 9321, 8210, 9322, 8211, 9330, 8212, 9331, 8220, 9332, 8221, 9333, 8222, 8223, 8224, 7234, 8229, 8230,
8231, 8232, 8240, 8250, 8251, 8252, 8253, 8260, 8261, 8262, 7320, 8263, 7321, 8264, 7322, 8265, 8266, 8269, 7330, 8270, 7331, 8271, 7332, 8272, 8273, 8274, 8275, 8276,
8277, 8278, 8279, 8280, 8281, 8282, 8283, 8284, 8285, 8286, 8290, 8300, 7421, 8310, 8312, 7424, 8320, 8321, 7431, 8322, 7432, 8323, 8324, 8330, 8334, 8340, 8400,
7530)] <- 9 # CLASS 9
data$egp[data$isco88 %in% c(6000, 6100, 6110, 6111, 6112, 6113, 6114, 6120, 6121, 6122, 6123, 6124, 6129, 6130, 6134, 6140, 6141, 6142, 6150, 6151, 9210, 6152, 9211, 6153, 9212,
6154, 9213, 8331)] <- 10 # CLASS 10
data$egp[data$isco88 %in% c(1221, 6131, 6132, 6133, 6200, 6210, 1311)] <- 11 # CLASS 11
# return root EGP values, if there is no additional info on empl. status
if (ncol(data) == 2) { return(data$egp) }
data$egp # TODO: reclassification code
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.