libname g350 "e:\sasdat\g350"; options linesize=180; options pagesize=200; *Read in the raw data; ***************************************************************************************; data g350.van06_1(compress=yes); length ctuid $ 10; infile "e:\sasdat\g350\van06_1.csv" delimiter="," lrecl=2000 missover; input ctname $ ctuid $ v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12 v13 v14 v15 v16 v17 v18 v19 v20 v21 v22 v23 v24 v25 v26 v27 v28 v29 v30 v31 v32 v33 v34 v35 v36 v37 v38 v39 v40 v41 v42 v43 v44 v45 v46 v47 v48 v49 v50 v51 v52 v53 v54 v55 v56 v57 v58 v59 v60 v61 v62 v63 v64 v65 v66 v67 v68 v69 v70 v71 v72 v73 v74 v75 v76 v77 v78 v79 v80 v81 v82 v83 v84 v85 v86 v87 v88 v89 v90 v91 v92 v93 v94 v95 v96 v97 v98 v99 v100 v101 v102 v103 v104 v105 v106 v107 v108 v109 v110 v111 v112 v113 v114 v115 v116 v117 v118 v119 v120 v121 v122 v123 v124 v125 v126 v127 v128 v129 v130 v131 v132 v133 v134 v135 v136 v137 v138 v139 v140 v141 v142 v143 v144 v145 v146 v147 v148 v149 v150 v151 v152 v153 v154 v155 v156 v157 v158 v159 v160 v161 v162 v163 v164 v165 v166 v167 v168 v169 v170 v171 v172 v173 v174 v175 v176 v177 v178 v179; run; ************************************************; *Create analysis variables from the raw extract; ************************************************; data g350.van06(compress=yes); set g350.van06_1; popch=(v3); label popch="population change"; density=(v2/v4); label density="persons per sq km"; single=v6/v5; label single="single population share"; divorce=v9/v5; label divorce="divorced population share"; separ=v8/v5; label separ="separated population share"; mckids=v21/v17; label mckids="married couples with children"; flone=v31/v17; label flone="female lone parent households"; crowd=v85/v80; label crowd="6+ person hhs as share of all priv hhs"; multi=v90/v88; label multi="multifamily households"; nonfam=v91/v88; label nonfam="nonfamily households"; aborig=v154/v153; label aborig="Aboriginal ancestry"; vm_ch=v158/v156; label vm_ch="vismin Chinese"; vm_sa=v159/v156; label vm_sa="vismin South Asian"; vm_bl=v160/v156; label vm_bl="vismin Black"; vm_fl=v161/v156; label vm_fl="vismin Filipino"; vm_la=v162/v156; label vm_la="vismin Latin American"; vm_se=v163/v156; label vm_se="vismin Southeast Asian"; vm_ar=v164/v156; label vm_ar="vismin Arab"; vm_wa=v165/v156; label vm_wa="vismin West Asian"; vm_ko=v166/v156; label vm_ko="vismin Korean"; vm_ja=v167/v156; label vm_ja="vismin Japanese"; vm_ot=v168/v156; label vm_ot="vismin Other"; vm_ml=v169/v156; label vm_ml="vismin, multiple identity"; imm50=v93/v2; label imm50="immigrants arrived before 1961"; imm60=v94/v2; label imm60="immigrants arrived 1961-1970"; imm70=v95/v2; label imm70="immigrants arrived 1971-1980"; imm80=v96/v2; label imm80="immigrants arrived 1981-1990"; imm90=v97/v2; label imm90="immigrants arrived 1991-2000"; imm06=v98/v2; label imm06="immigrants arrived 2001-2006"; lico=v172; label lico="total incidence of low income after tax"; mhhinc=(v176/55231); label mhhinc="median household income ratio"; elite=v175/v173; label elite="share of households over 100k"; inc10=v174/v173; label inc10="share of households under 10k"; avval=(v175/520937); label avval="average dwelling value ratio"; unemp=v101/v99; label unemp="unemployment rate"; rent=v178; label rent="average gross rent"; hown=v58/v57; label hown="homeownership rate"; h_sf=v72/v71; label h_sf="single family housing"; h_sm=(v73+v74)/v71; label h_sm="semi-detached and row housing"; h_du=v75/v71; label h_du="duplex housing"; h_hi=v76/v71; label h_hi="apartment bldgs 5+ stories"; h_lo=v77/v71; label h_lo="apartment bldgs <5 stories"; h_band=v60/v57; label h_band="band housing"; b46=v62/v61; label b46="share units built before 1946"; b50=v63/v61; label b50="share units built 1946-1960"; b60=v64/v61; label b60="share units built 1961-1970"; b70=v65/v61; label b70="share units built 1971-1980"; b80=(v66+v67)/v61; label b80="share units built 1981-1990"; b90=(v68+v69)/v61; label b90="share units built 1991-2000"; b06=v70/v61; label b06="share units built 2001-2006"; occ_mg=v103/v102; label occ_mg="occupations: management"; occ_bf=v104/v102; label occ_bf="occupations: business, finance, admin"; occ_sc=v105/v102; label occ_sc="occupations: natural and applied sciences"; occ_hl=v106/v102; label occ_hl="occupations: health"; occ_ss=v107/v102; label occ_ss="occupations: social sci, ed, govt, religion"; occ_ar=v108/v102; label occ_ar="occupations: art, culture, recreation, sport"; occ_sl=v109/v102; label occ_sl="occupations: sales and service"; occ_tr=v110/v102; label occ_tr="occupations: trades, transport operators"; occ_pm=v111/v102; label occ_pm="occupations: primary industry"; occ_mf=v112/v102; label occ_mf="occupations: processing, mfg, utilities"; hm_hrs=(v118+v119)/v113; label hm_hrs="males doing 30+hrs housework"; hf_hrs=(v125+v126)/v120; label hf_hrs="females doing 30+hrs housework"; cm_hrs=(v132+v133)/v127; label cm_hrs="males doing 30+hrs childcare"; cf_hrs=(v139+v140)/v134; label cf_hrs="females doing 30+hrs childcare"; em_hrs=v146/v141; label em_hrs="males doing 20+hrs elder care"; ef_hrs=v152/v147; label ef_hrs="females doing 20+hrs elder care"; run; proc factor data=g350.van06 n=12 score rotate=varimax out=fact01; var popch density single divorce separ mckids flone crowd multi nonfam aborig vm_ch vm_sa vm_bl vm_fl vm_la vm_se vm_ar vm_wa vm_ko vm_ja vm_ot vm_ml imm50 imm60 imm70 imm80 imm90 imm06 lico mhhinc elite inc10 avval unemp rent hown h_sf h_sm h_du h_hi h_lo h_band b46 b50 b60 b70 b80 b90 b06 occ_mg occ_bf occ_sc occ_hl occ_ss occ_ar occ_sl occ_tr occ_pm occ_mf hm_hrs hf_hrs cm_hrs cf_hrs em_hrs ef_hrs; title '2006 Full Vancouver Social Mosaic'; run; data _null_; set fact01; file "e:\sasdat\g350\full06.txt" lrecl=1200; put ctuid factor1-factor12 popch density single divorce separ mckids flone crowd multi nonfam aborig vm_ch vm_sa vm_bl vm_fl vm_la vm_se vm_ar vm_wa vm_ko vm_ja vm_ot vm_ml imm50 imm60 imm70 imm80 imm90 imm06 lico mhhinc elite inc10 avval unemp rent hown h_sf h_sm h_du h_hi h_lo h_band b46 b50 b60 b70 b80 b90 b06 occ_mg occ_bf occ_sc occ_hl occ_ss occ_ar occ_sl occ_tr occ_pm occ_mf hm_hrs hf_hrs cm_hrs cf_hrs em_hrs ef_hrs; run; proc factor data=g350.van06 n=10 score rotate=varimax out=fact02; var popch lico mhhinc elite inc10 avval unemp single divorce separ mckids flone crowd multi nonfam aborig vm_ch vm_sa vm_bl vm_fl vm_la vm_se vm_ar vm_wa vm_ko vm_ja vm_ot vm_ml imm50 imm60 imm70 imm80 imm90 imm06; title '2006 Immigration and Racial-Ethnic Diversity'; run; data _null_; set fact02; file "e:\sasdat\g350\imm06.txt" lrecl=1200; put ctuid factor1-factor10; run; proc factor data=g350.van06 n=8 score rotate=varimax out=fact03; var popch lico mhhinc elite inc10 avval unemp rent hown h_sf h_sm h_du h_hi h_lo h_band b46 b50 b60 b70 b80 b90 b06; title '2006 Housing Construction Cycles'; run; data _null_; set fact03; file "e:\sasdat\g350\hsg.txt" lrecl=1200; put ctuid factor1-factor8; run; proc factor data=g350.van06 n=8 score rotate=varimax out=fact04; var popch lico mhhinc elite inc10 avval unemp occ_mg occ_bf occ_sc occ_hl occ_ss occ_ar occ_sl occ_tr occ_pm occ_mf hm_hrs hf_hrs cm_hrs cf_hrs em_hrs ef_hrs; title '2006 Occupational Segmentation and Family Work'; run; data _null_; set fact04; file "e:\sasdat\g350\occ06.txt" lrecl=1200; put ctuid factor1-factor8; run;