x cd /pub/data/sf12010x/Tools; %let pgm=invoke_dosets; filename pgm "&pgm..sas"; /*--Invoke the %doset macro to create observations in the Datasets dataset for this directory. J. Blodgett, OSEDA, June, 2011, -- */ title "Job to Invoke doset Macro for Sets in sf12010x, creating sf12010x.datasets"; libname sf12010x '/pub/data/sf12010x'; libname sf1x (sf12010x); %let libnameg=sf12010x; %***let todo=usplaces usplaces160 usplaces10k; *<=======================NOTE===============================; %*et todo=mocdslds2012 moregns; %*let todo=mouas2010 ; %*let todo=mocdslds2012; ** moregns; %*let todo=molibdists13; %*let todo=ustracts080; *-----Run this step ONLY ONCE------------------------------------------; *----If you need to rerun (start over) then delete the datasets dataset first. doset will not allow initialize mode if the datasets set already exists.---; %***doset(mode=initialize, libname=sf12010x,debug=1); %macro doit(state,stab); *----------------------------------------------------------------------; %doset(mode=,libname=sf12010x, memname=&stab.blocks, geouniv=&statenm, units=%str(census block), Years=2010, CreatePgm=cnvt_sf12010x, Keywords=2010 census standard extract blocks, Description=%nrbquote(Standard extract for &statenm Census Blocks), keyvars=county placefp cousubfp cbsa UA UrbanRur UAType , keyfmats=county &stab.place &stab.mcd cbsa uaname | |, keyquals=%str(| state county ), DataSource=%str(U.S. Bureau of the Census/MCDC), SortedBy=county tract block, UsageNotes=%nrbquote(), SubType=block, SetGroup=&stab, VarSet=variables, URLMeta=%str(https://mcdc.missouri.edu/pub/data/sf12010x/Variables.pdf), debug=0); /*<=========================Comment out===================================== %doset(mode=,libname=sf12010x, memname=&stab.bgs150, geouniv=&statenm, units=%str(block groups), Years=2010, CreatePgm=cnvt_sf12010x, Keywords=2010 census standard extract complete block groups, Description=%nrbquote(Standard extract for &statenm Block Groups), keyvars=county cbsa metdiv, keyfmats=county cbsa metrodiv, keyquals=%str(| | | ), DataSource=%str(U.S. Bureau of the Census/MCDC), SortedBy=county tract bg, UsageNotes=%nrbquote(), SubType=bg, SetGroup=&stab, VarSet=variables, URLMeta=%str(https://mcdc.missouri.edu/pub/data/sf12010x/Variables.pdf), debug=0); %doset(mode=,libname=sf12010x, memname=&stab.selectedinv, geouniv=&statenm, units=%str(state county countysub place tract zcta), Years=2010, CreatePgm=cnvt_sf12010x, Keywords=2010 census standard extract inventory summary levels, Description=%nrbquote(Standard extracts for &statenm common inventory summary levels), keyvars= sumlev state county placefp cousubfp cbsa metdiv, keyfmats=sumlev state county &stab.place &stab.mcd cbsa metrodiv, keyquals=%str(| | | state county ), DataSource=%str(U.S. Bureau of the Census/MCDC), SortedBy=SumLev esriid, UsageNotes=%nrbquote(), URLMeta=%str(https://mcdc.missouri.edu/pub/data/sf12010x/Variables.pdf), SubType=selectedinv, SetGroup=&stab, VarSet=variables, debug=0); ===========================End commented out================================ */ %mend doit; *-----running this 4-22-17 to redefine the entries for all blocks datasets that now have UA data-----------; %dostates(n=52,names=1) /*<=========================Comment out original invokes===================================== %dostates(10,names=1); %dostates(13 21 23 33 51,names=1); %dostates(04 27 30 36 40 50,names=1); %dostates(02 08 09 31 37,names=1); %dostates(06 20 42 56,names=1) ; %dostates(01 15,names=1) %*ostates(72,names=1) ; *--we do not have the required blkrel10 sets to do the 2000 trends for PR yet--; %dostates(16 29 39 49 54 55,names=1); %dostates(17 18 32 41 46 53,names=1); %dostates(05 22 19 34 48,names=1); %dostates(11 12 25 26 45,names=1); %dostates(24,names=1); %dostates(28 35 38 44 47,names=1) ; ===========================End commented out================================ */ /*<=========================Comment out===================================== %*--Here we do the new set of 2012 vintage data sets created 10-14--; %macro doit(state,stab); %doset(mode=,libname=sf12010x, memname=&stab.cdsldspumas2012, geouniv=&statenm, units=%str(cd113 slds2012 pumas2012), Years=2010, CreatePgm=cnvt_sf12010x_uscdslds2012, Keywords=2010 census standard extract 2012 puma slds 113th cd summary levels, Description=%nrbquote(Standard extracts for &statenm 2012-vintage CDs (113th), SLDS, and PUMAs), keyvars= sumlev state county, keyfmats=sumlev state county, DataSource=%str(U.S. Bureau of the Census/MCDC), SortedBy=SumLev esriid, UsageNotes=%nrbquote(), URLMeta=%str(https://mcdc.missouri.edu/pub/data/sf12010x/Variables.pdf), SubType=cdsldspumas2012, SetGroup=&stab, VarSet=variables, debug=0); %mend doit; %dostates(n=51,names=1); %let statenm=United States; %doit(00,us) *----And now we do the generated us data sets----------------*; %doset(mode=,libname=sf12010x, memname=uscousubs, geouniv=United States, units=%str(County Subdivisions), Years=2010, CreatePgm=create_us_datafiles, Keywords=2010 census standard extract mcds, Description=%nrbquote(Standard extract for all US County Subdivisions), keyvars=state county , keyfmats=state county, keyquals=, DataSource=%str(U.S. Bureau of the Census/MCDC), SortedBy=state county cousubfp, UsageNotes=%nrbquote(), SubType=selectedinv, SetGroup=us, VarSet=variables, URLMeta=%str(https://mcdc.missouri.edu/pub/data/sf12010x/Variables.pdf), debug=0); %doset(mode=,libname=sf12010x, memname=ustracts, geouniv=United States, units=%str(Census Tracts), Years=2010, CreatePgm=create_us_datafiles, Keywords=2010 census standard extract tracts, Description=%nrbquote(Standard extract for all US Cenus Tracts), keyvars=state county , keyfmats=state county, keyquals=, DataSource=%str(U.S. Bureau of the Census/MCDC), SortedBy=state county tract, UsageNotes=%nrbquote(), SubType=selectedinv, SetGroup=us, VarSet=variables, URLMeta=%str(https://mcdc.missouri.edu/pub/data/sf12010x/Variables.pdf), debug=0); %doset(mode=,libname=sf12010x, memname=usstcnty, geouniv=United States, units=%str(State County), Years=2010, CreatePgm=create_us_datafiles, Keywords=2010 census standard extract state county, Description=%nrbquote(Standard extract for all US States and Counties), keyvars=sumlev state county , keyfmats=sumlev state county, keyquals=, DataSource=%str(U.S. Bureau of the Census/MCDC), SortedBy=state county cousubfp, UsageNotes=%nrbquote(), SubType=selectedinv, SetGroup=us, VarSet=variables, URLMeta=%str(https://mcdc.missouri.edu/pub/data/sf12010x/Variables.pdf), debug=0); %doset(mode=,libname=sf12010x, memname=uszips871, geouniv=United States, units=%str(ZCTA), Years=2010, CreatePgm=create_us_datafiles, Keywords=2010 census standard extract state zcta zipcode, Description=%nrbquote(Standard extract for all ZIP Code/ZCTAs within States), keyvars=state , keyfmats=state, keyquals=, DataSource=%str(U.S. Bureau of the Census/MCDC), SortedBy=state zcta5, UsageNotes=%nrbquote(), SubType=selectedinv, SetGroup=us, VarSet=variables, URLMeta=%str(https://mcdc.missouri.edu/pub/data/sf12010x/Variables.pdf), debug=0); %doset(mode=,libname=sf12010x, memname=usplaces, geouniv=United States, units=%str(place), Years=2010, CreatePgm=create_us_datafiles, Keywords=2010 census standard extract state place city, Description=%nrbquote(Standard extract for all US Places (Cities) in U.S.), keyvars=state , keyfmats=state, keyquals=, DataSource=%str(U.S. Bureau of the Census/MCDC), SortedBy=state place, UsageNotes=%nrbquote(), SubType=selectedinv, SetGroup=us, VarSet=variables, URLMeta=%str(https://mcdc.missouri.edu/pub/data/sf12010x/Variables.pdf), debug=0); %doset(mode=,libname=sf12010x, memname=uscdslds, geouniv=United States, units=%str(cd state legislative district), Years=2010, CreatePgm=create_us_datafiles, Keywords=2010 census standard extract state congressional district 11 legislative, Description=%nrbquote(Standard extract for all US Congressional Districts (111th) and State Leg Districts circa 2009), keyvars=sumlev state , keyfmats=sumlev state, keyquals=, DataSource=%str(U.S. Bureau of the Census/MCDC), SortedBy=state, UsageNotes=%nrbquote(), SubType=selectedinv, SetGroup=us, VarSet=variables, URLMeta=%str(https://mcdc.missouri.edu/pub/data/sf12010x/Variables.pdf), debug=0); %doset(mode=,libname=sf12010x, memname=usregdiv, geouniv=United States, units=%str(US total region division), Years=2010, CreatePgm=create_us_datafiles, Keywords=2010 census standard extract state national totals census regions divisions, Description=%nrbquote(Standard extract for US totals and for US Census Regions & Divisions), keyvars=sumlev , keyfmats=sumlev, keyquals=, DataSource=%str(U.S. Bureau of the Census/MCDC), SortedBy=sumlev, UsageNotes=%nrbquote(), SubType=selectedinv, SetGroup=us, VarSet=variables, URLMeta=%str(https://mcdc.missouri.edu/pub/data/sf12010x/Variables.pdf), debug=0); %doset(mode=,libname=sf12010x, memname=usschools, geouniv=United States, units=%str(School District), Years=2010, CreatePgm=create_us_datafiles, Keywords=2010 census standard extract national school districts, Description=%nrbquote(Standard extract for all US School Districts), keyvars=sumlev state, keyfmats=sumlev state, keyquals=, DataSource=%str(U.S. Bureau of the Census/MCDC), SortedBy=sumlev, UsageNotes=%nrbquote(), SubType=selectedinv, SetGroup=us, VarSet=variables, URLMeta=%str(https://mcdc.missouri.edu/pub/data/sf12010x/Variables.pdf), debug=0); *----And 3 custom Mo datasets---; %doset(mode=,libname=sf12010x, memname=mocdslds2012, geouniv=Missouri, units=%str(2012 House & Senate dists and 113th CDs), Years=2010, CreatePgm=cnvt_sf12010x_mocdslds2012, Keywords=2010 census standard extract state house senate districts, Description=%nrbquote(Mo House and Senate Districts 2012, 113th (elected in 2012) CDs), keyvars=sumlev county, keyfmats=sumlev mocnty, keyquals=, DataSource=%str(U.S. Bureau of the Census/Mo redistricting office), SortedBy=, UsageNotes=%nrbquote(), SubType=specialtab, SetGroup=mo, VarSet=variables, URLMeta=%str(https://mcdc.missouri.edu/pub/data/sf12010x/Variables.pdf), debug=0); %doset(mode=,libname=sf12010x, memname=mouas2010, memlabel=%str(Mo Urban/Rural and Urban Area data using 2010 revised UR defns), geouniv=Missouri, units=%str(Urban Areas and Urban/Rural portions), Years=2010, CreatePgm=cnvt_sf12010x_mouas2010, Keywords=2010 census standard extract urban rural urbanized area urban cluster, Description=%nrbquote(Mo UA and UA-within-county summaries. Custom aggregated by mcdc using 2010 U-R defns), keyvars=sumlev county geocomp ua uatype, keyfmats=sumlev mocnty geocomp uaname, keyquals=, DataSource=%str(U.S. Bureau of the Census, aggregation by MCDC), SortedBy=, UsageNotes=%nrbquote(), SubType=specialtab, SetGroup=mo, VarSet=variables, URLMeta=%str(https://mcdc.missouri.edu/pub/data/sf12010x/Variables.pdf), debug=0); %doset(mode=,libname=sf12010x, memname=moregns, geouniv=Missouri, units=%str(Various county-based regions), Years=2010, CreatePgm=cnvt_sf12010x_moregns, Keywords=2010 census standard extract regions aaa ded modot rpc unmx, Description=%nrbquote(Mo County-based regions: RPCs, MoDOT, DED, AAA and UM Ext Regeions), keyvars=sumlev , keyfmats=sumlev , keyquals=, DataSource=%str(U.S. Bureau of the Census/MCDC county equivalency data), SortedBy=, UsageNotes=%nrbquote(), SubType=specialtab, SetGroup=mo, VarSet=variables, URLMeta=%str(https://mcdc.missouri.edu/pub/data/sf12010x/Variables.pdf), debug=0); %doset(mode=,libname=sf12010x, memname=ustracts080, geouniv=United States, units=%str(tracts080), Years=2010, CreatePgm=ustracts080, Keywords=2010 census standard extract split census tracts within mcd place, Description=%nrbquote(Standard extract for all level 080: tract within county subdiv and place), keyvars=state county cousubfp placefp cbsa, keyfmats=state county cousub place cbsa, keyquals=%str(state | county), DataSource=%str(U.S. Bureau of the Census), SortedBy=state county, UsageNotes=%nrbquote(), SubType=tracts080, SetGroup=us, VarSet=variables5yr, URLMeta=%str(https://mcdc.missouri.edu/pub/data/sf12010x/Variables.pdf), debug=0); %doset(mode=,libname=sf12010x, memname=molibdists13, geouniv=Missouri, units=%str(library districts), Years=2010, CreatePgm=molibdists13, Keywords=2010 census standard extract Missouri library districts, Description=%nrbquote(Standard extract aggregated from moblocks to 2013-vintage Library Districts), keyvars=distcode, keyfmats=libdname, keyquals=, DataSource=%str(U.S. Bureau of the Census, MCDC Custom processing.), SortedBy=, UsageNotes=%nrbquote(), SubType=, SetGroup=mo, VarSet=, URLMeta=%str(https://mcdc.missouri.edu/pub/data/sf12010x/Variables.pdf), debug=0); ==========================end comment====================================== */ proc datasets library=sf12010x nolist; modify datasets; index delete dataset memname; index create dataset=(libname memname) / unique; index create memname; quit; options NOmprint msglevel=i; %gendshtm(libname=sf12010x,debug=0,runprocc=1);