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(
- This is a standard extract of the data set with the same name in the sf12010 data directory. That
data set is comprised of detailed tables as defined and released by the Census Bureau. The data in this set are derived from those
tables .
- There are some variables available in other data sets in this collection that are undefined at the block level. These are
variables that require PCT table data which is not available at the block level.
- See Variables.pdf file for variable details.
- The 2000 population figure was approximated using the equivalencies provided in the blkrel10 data collection from the Census
Bureau.
- This is not the orginal dataset created back in 2001. It was regenerated in 2017 to add the variables UrbanRur, UASC and UAType
and to assign a value to the UA variable, which was always blank on the orginal sets. See usblocksua_rename.sas for actual createpgm.
- These revised sets are also sorted differently from the original and the corresponding sf12010 complete table sets.
),
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(- This is a standard extract of the data set with the same name in the sf12010 data directory. That
data set is comprised of detailed tables as defined and released by the Census Bureau. The data in this set is derived from those
tables .
- There are some variables available in other data sets in this collection that are undefined at the block group level. These are
variables that require PCT table data which is not available at the block group level.
- See Variables.pdf file for variable details.
- The 2000 population figure was approximated using the equivalencies provided in the blkrel10 data collection from the Census
Bureau.
),
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(- This is one of several data sets created for &statenm. Summaries for the state, counties, places,
ZCTAs, census tracts, etc.
- See Variables.pdf file for variable details.
- The 2000 population figure was taken from the SF1 extract data set from the 2000 census. If an area has changed definition over
the decade the 2000 pop figure is for the old geographic definition. An exception is census tracts, which were aggregated up from the
block level estimates using blkrel10 equivalency files.
),
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(- These data aggregated from SF1 block level data using mable14 data to assign 2012 geocodes.
So there is no apportioning: these data should be exact.
- See Variables.pdf file for variable details.
- The 2000 population figure was taken from the mable14 pop2k variable.
- Variables derived from PCT and HCT tables are not on this data set.
),
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(- This data set was created by selecting (SumLev=060) and concatenating the 51 state level inventory
data sets
- See Variables.pdf file for variable details.
- The 2000 population figure was taken from the 2000 SF1 national data set using the county sub as it was defined then.
- When we first created this data set we called it usmcds. That changed 8-31-11.
),
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(- This data set was created by selecting (SumLev=140) and concatenating the 51 state level inventory
data sets
- See Variables.pdf file for variable details.
- The 2000 population figure was taken from the 2000 SF1 national data set using the county sub as it was defined then.
- This data set is used by the caps10c web application as the source data for doing large circular areas (over 20 miles)
),
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(- This data set was created by selecting state and county level summaries
from the 51 state level inventory data sets and concatenating them.
- Includes county equivalents such as parishes in LA and independent cities,
- See Variables.pdf file for variable details.
- The 2000 population figure was taken from the 2000 SF1 national data set using the state and county as defined then.
),
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(- This data set was created by selecting 871 ZCTA/State level summaries
from the 51 state level inventory data sets and concatenating them.
- Not all ZIP Codes are ZCTAs but all ZCTAs correspond to residential ZIP codes,
- See Variables.pdf file for variable details.
- The 2000 population figure was taken from the 2000 SF1 national data set using the ZCTAs as defined then.
),
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(- This data set was created by selecting 160 complete-place level summaries
from the 51 state level inventory data sets and concatenating them.
- Places do not necessarily nest within counties so no county codes are provided on this set. There are 155 SumLev
summaries on the 51 XXinventory data sets if you need that geographic detail.
- See Variables.pdf file for variable details.
- The 2000 population figure was taken from the 2000 SF1 national data set using the places as they were defined then.
),
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(- This data set was created by selecting 500, 610 & 620 level summaries
from the 51 state level inventory data sets and concatenating them.
- Some states are unicameral (do not have two levels in their state legislatures). These are the SLDs as defined on 1-1-10.
- See Variables.pdf file for variable details.
- The 2000 population figure was taken from the 2000 SF1 national data set using the districts as they were defined then.
),
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(- This data set was created by aggregating state data
- See Variables.pdf file for variable details.
),
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(- This data set was created by selecting 950, 960 & 970 level school district summaries
from the 51 state level inventory data sets and concatenating them.
- See Variables.pdf file for variable details.
- The 2000 population figure was taken from the 2000 SF1 national data set using the districts as they were defined then.
),
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(- This data set was created by aggregating SF1 block level data for MO using
a block level equivalency file obtained from the Mo redistricting office via GRC.
- See Variables.pdf file for variable details.
- Because we created these tabs by aggregating block level data we did not have any PCT or HCT tables data available. As a result
some variables are not included on this data set. These include detailed Asian and Hispanic categories (Samoan, Mexican, etc) as well
as a number of items related to same sex and unmarried parter households.
- The 2000 population figure is not available for these units.
- In addition to complete-district summaries we also include county portion summaries (levels 510, 612 and 622). The County
variable will be blank for complete-district summaries (levels 500, 610 and 620).
),
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(- This data set was created by aggregating SF1 block level data for MO using
a block level equivalency file created by the GRC using TIGER-based UA coverages released in the spring of 2012.
- See Variables.pdf file for variable details.
- The 2000 population figure is not available for these units.
- In addition to complete UA (within state) we also include county portion summaries. The pseudo-UA code of 99999
is used to indicate remainder areas not withib any UA, i.e. Rural.
- There are 3 state level summaries including an urban and rual portion using geocomp categories.
- The aggregation work was done at the level of the full SF1 data using the agguas2010.sas setup in the sf12010/Tools dir.
- The file linking Mo census blocks to UA and U/R is in the georef filetype, set moblk2ur10.
),
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(- Custom aggregated by MCDC from SF1 county level data.
- The mocogeos dataset in the /pub/data/georef directory is the source for linking counties to these regions.
- As far as we know the regions are current as of early 2012.
- See Variables.pdf file for variable details.
),
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(
- See Variables.pdf file for variable details.
- Our intention is to merge this set with the latest 5yr ACS data to generate the dataset used in the caps10acs app.
),
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(- There are portions of the state that are not within any library district.
- Some variables available at higher geographic levels are not available on this data set. It only has
variables which are defined at the block level.
- Uses the block-level equivalency file created by J. Harlan, GRC - stored in corrlst.mobl2libd2010,
),
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);