/* Update the mable22 datasets and views used by the geocorr 2022 web application. Adding 2023 RUCCs (Rural-Urban Continuum Codes), July 1, 2024. */ %include '/pub/sas/autoexec.sas'; options fmtsearch=(mable22 sasctlgs); options nosource nosource2 nomprint nomlogic nosymbolgen notes; libname mable22 '/pub/data/mable22'; %macro doit(state,stab); PROC SQL; CREATE TABLE &stab._counties AS SELECT t1.State, t1.Stab, t1.County, t1.County3, t1.Region, t1.Division, t1.CBSA20, t1.CBSAType20, t1.CSA20, t1.Metdiv20, t1.CBSA23, t1.CBSAType23, t1.CBSACentral23, t1.CSA23, t1.Metdiv23, t2.RUCC23 LABEL="Rural-urban continuum code (2023)" as RUCC23, t1.LSAD, t1.FuncStat, t1.CtyPop20, t1.CtyHUs FROM mable22.&stab._counties t1 LEFT JOIN mable22.RUCC23_for_merge t2 ON (t1.county = t2.county); QUIT; data mable22.&stab._counties; set &stab._counties; run; * Create the views. ; data mable22.&stab.v/view=mable22.&stab.v; merge mable22.&stab._blocks mable22.&stab._counties ; by county; run; %mend doit; /* begin comment ==================================== %dostates(01 02 04 05 06 08 09 10 11 12 13 15 16 17); %dostates(18 19 20 21 22 23 24 25 26 27 28 29 30 31); %dostates(32 33 34 35 36 37 38 39 40 41 42); %dostates(44 45 46 47 48 49 50 53 54 55 56); %dostates(51 72); %dostates(10 11); ========================== end comment */ %dostates(n=52);