x cd /pub/data/georef/Tools; %let pgm=invoke_dosets; filename pgm "&pgm..sas"; /*--Invoke the %doset macro to create observations in the Datasets dataset for this directory. ******************************************************************************************************** * This setup was lost (in 2006) and has not been recovered. We now use fsedit to update the entries * * for the CBSA related data sets each year. At least that is the plan. Doing it 10-22-08 for the * * first time. Maybe later we can tackle this but it just does not seem quite worth it at this point. * * THIS CAN BE RUN TO UPDATE THE AUTOMATIC PROC CONTENTS STUFF. <=======================NOTE!!! * * jgb, 10.22.09 * ******************************************************************************************************** *----Ignore above comments. March, 2013 we are going to try and put back the cbsa-related defns after an update to the defns. ------*/ libname georef '/pub/data/georef'; %let libnameg=georef; option nofmterr; %**let todolist=zcta_master; %**let todolist=mocogeos14; *<====================================================================; %*let todolist=puma_master; %**et todolist=moblks_ur6; %let todolist=adjacent_counties2010 adjacent_counties2010_collapsed; %let todolist=cbsacos cbsacos15; *-----Run this step ONLY ONCE------------------------------------------; %*doset(mode=initialize, libname=georef,memname=badblks,debug=1); ; %macro dum; data georef.datasets; set georef.datasets_old; if memlabel=' ' and substr(memname,length(memname)-1,2)='04' then delete; retain flag 0; drop flag; if memname='cbsapops04' then if flag=0 then do; flag=1; delete; end; run; data georef.datasets; set georef.datasets; if setgroup='cbsaYY' then do; **setgroup='cbsaYY'; CreatePgm='cbsas08'; Years='2008'; if memename='cbsapops' then Years='2000 2009'; *<===; if memlabel ne ' ' then description=memlabel; end; run; %mend dum; /* ========================begin comment==================================== %doset(memname=zcta_master,memlabel=%str(ZIP/ZCTA master dataset vintage 2014), geouniv=UnitedStates,Unit=ZCTA,Years=%str(2008-2012), description= %str(Comprehensive resource for these ZIP code proxies showing geographic correspondences and latest ACS-based demographics), usageNotes=%nrbquote(
  1. A previous version of this dataset has been renamed zcta_master07 and is still available if you want to work with vintage 2000 ZCTAs
  2. We replaced the version generated in Aug 2013 with this one in July 2014. We upated several geocodes and all the ACS data. The ACS data are now 2008-2012 period estimates from the Census Bureau.
  3. Sumlev is 860, complete ZCTA. The ACS data are for entire ZCTA, but allocation factors and geos are within primary state. Only 103 ZCTAs cross state boundaries. To see them use Nstates=2 filter.
  4. The lat-long coordinate variables (IntPtLat and IntPtLon) are taken from the latest ACS data sets. Same with the SQMI vars.
  5. The naltzips and altzips fields allow you to identify special ("alternate") ZIP codes located within the ZCTA.
  6. We have a special Metatata file that you must at least scan before using this data set (see link, below).
  7. The CBSA, CSA and MetDiv metro geocodes are now vintage 2013 (current as of 7/14)
  8. These exact same data are also available in the zctamstr subdirectory where we have one file per state.
), SortedBy=State zcta5, CreatePgm=zcta_master12, SortPrio=1, urlmeta=%str(https://mcdc.missouri.edu/pub/data/georef/zcta_master.Metadata.html), keyVars=state county cbsa CBSAtype UA uatype metdiv csa, keyFmats=state county cbsa | uauc | metdiv csa, subtype=zctamaster, debug=0); %doset(memname=puma_master,memlabel=%str(PUMA master dataset vintage 2013), geouniv=UnitedStates,Unit=PUMAS,Years=%str(2013), description= %str(Comprehensive resource for 2010 (aka 2012) Public Use Microdata Areas (PUMAs) showing geographic correspondences and recent (2013 1-year) ACS-based demographics), usageNotes=%nrbquote(
  1. If this looks familiar then maybe you have accessed the zcta_master dataset that is the equivalent resource for 2010 ZCTAs
  2. A web app at https://mcdc.missouri.edu/websas/display_pumamaster.html lets you select a state and enter a 5-digit PUMA code. The application will then display the contents of the puma_master observation for that specified PUMA. It will also display hyperlinks to two mapping resources to help you see the PUMA.
  3. We have a special Metatata file that you should at least scan before using this data set (see link, below). Very similar to one we created for zcta_master.
  4. The CBSA, CSA and MetDiv metro geocodes are vintage 2013 (current as of 7/14)
  5. These exact same data are also available in the pumamstr subdirectory where we have one file per state.
), SortedBy=State puma, CreatePgm=puma_master12, SortPrio=2, urlmeta=%str(https://mcdc.missouri.edu/pub/data/georef/puma_master.Metadata.html), keyVars=state puma cbsa csa, keyFmats=state puma cbsa csa, keyquals=%str(| state | |); subtype=pumamaster, debug=0); ===========================End commented out================================ */ %doset(memname=cbsacos, geouniv=UnitedStates,units=county,years=2015, description=%nrbquote(The Year variable indicates the CBSA vintage. Pop variables contain recent county estimates.), createpgm=cbsas15, UsageNotes=%nrbquote(), keyvars=state county cbsa cbsatype year metrodiv csa, keyfmats=state county cbsa | | metrodiv csa, setgroup=cbsa, debug=0) %doset(memname=cbsacos15,memlabel=%nrbquote(Latest set showing which counties go with what CBSAs), geouniv=UnitedStates,units=county,years=2015, description=%nrbquote(The Year variable indicates the CBSA vintage. Pop variables contain recent county estimates.), createpgm=cbsas15, UsageNotes=%nrbquote(), keyvars=state county cbsa cbsatype year metrodiv csa, keyfmats=state county cbsa | | metrodiv csa, setgroup=cbsa, debug=0) /*<=========================Comment out===================================== %doset(memname=cbsas,memlabel=%nrbquote(Latest set showing CBSA codes and names), geouniv=UnitedStates,units=cbsa,years=2013, description=%nrbquote(The Year variable indicates the CBSA vintage.), createpgm=cbsas13, UsageNotes=%nrbquote(), keyvars=cbsa cbsatype year csa States, keyfmats=%str(cbsa | | csa |), setgroup=cbsa, debug=0) %doset(memname=csacbsas,memlabel=%nrbquote(Latest set showing CBSA/CSA codes and names), geouniv=UnitedStates,units=cbsa within csa,years=2013, description=%nrbquote(Combined Statistical Areas with CBSA components), createpgm=cbsas13, UsageNotes=%nrbquote(), sortedby=csa cbsa, keyvars= cbsa year csa state, keyfmats=%str(cbsa | csa state), setgroup=cbsa, debug=0) %doset(memname=metrodivs,memlabel=%nrbquote(Latest set showing Metropolitan Div codes and names), geouniv=UnitedStates,units=metrodiv within cbsa,years=2013, description=%nrbquote(Metropolitan Divisions within CBSA), createpgm=cbsas13, UsageNotes=%nrbquote(), sortedby=cbsa MetroDiv, keyvars= cbsa year csa State, keyfmats=%str(cbsa | csa state), setgroup=cbsa, debug=0) ; %doset(memname=cbsapops,memlabel=%nrbquote(Latest set showing CBSA 2010 pop and latest Pop Estimate), geouniv=UnitedStates,units=CBSA,years=2013, description=%nrbquote(Current CBSAs as of 2/13 with Counties comprising and Pop Data), createpgm=cbsas13, UsageNotes=%nrbquote(), sortedby=cbsa, keyvars= cbsa cbsatype, keyfmats=%str(cbsa | ), setgroup=cbsa, debug=0) ; %let mocogeosyr=14; %doset(memname=mocogeos&mocogeosyr, geouniv=Missouri,units=county,years=20&mocogeosyr, description=%nrbquote(Key resource data set showing 6 current county-based region codes and their names), createpgm=mocogeosYY, UsageNotes=%nrbquote(), sortedby=county, keyvars= county, keyfmats=%str(mocnty), setgroup=mocogeos, debug=0) ; %doset(memname=moblks_ur6, geouniv=Missouri,units=block,years=2010, description=%nrbquote(We assigned 6 urban/region categories for urmdc project fall 2014) createpgm=moblks_ur6, UsageNotes=%nrbquote(), sortedby=county tract block, keyvars= county, keyfmats=%str(mocnty), debug=0) ; %doset(memname=adjacent_counties2010, geouniv=United States,units=county,years=2010, description=%nrbquote(Each obs describes a pair of adjacent counties as of 2010), createpgm=county_adjacency, UsageNotes=%nrbquote(), sortedby=county county2, setgroup=adjacency, keyvars=state county, keyfmats=%str(state county), debug=0) ; %doset(memname=adjacent_counties2010_collapsed, geouniv=United States,years=2010, description=%nrbquote(Each obs describes a county with adjacent counties IDed in two list-of-values variables), createpgm=county_adjacency, UsageNotes=%nrbquote(), sortedby=county , setgroup=adjacency, keyvars=state county, keyfmats=%str(state county), debug=0) ; *--We ran metafix on this filetype (from /pub/data/system/Tools/invoke_metafix.sas) and now we use the file it generated to do some updating--; %*include 'file_dosets.sas' / source2; ===========================End commented out================================ */ proc datasets library=georef nolist; modify datasets; index delete dataset memname; index create dataset=(libname memname) / unique; index create memname; quit; options mprint msglevel=i; %gendshtm(libname=georef,debug=1,runprocc=1);