x cd /pub/data/acs2009/Tools; %let pgm=invoke_dosets_profiles; filename pgm "&pgm..sas"; /*--Invoke the %doset macro to create observations in the Datasets dataset for the acs2009 directory which contains key profiles data sets as well as geography sets. Does not include basetbls data which is handled separately. J. Blodgett, OSEDA, Oct, 2010 Adding the tract level allocated data sets using 2010 tracts 3/2016. (See /pub/tutorials/data_allocation). -- */ title "Job to Invoke doset Macro for Sets in acs2009"; libname acs2009 '/pub/data/acs2009'; libname user '/SAS_temp/user'; %let libnameg=acs2009; %let gyear=2009; %*let todo=_template_mcdcpros5 momcdcprofiles5yr; %*let todo=usmcdcprofiles5yr allgeos allgeos5yr _template_allgeos; %*let todo=momcdcprofiles5yr; %let todo=; *-----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=acs2009,debug=1); *----------------------------------------------------------------------; /*<=========================Comment out===================================== options mprint; %doset(memname=_template_mcdcpros1, filetype=acs2009, geouniv=United States, memlabel=%str(MCDC profile extract for all US areas with 65,000+ population based on ~gyear surveys), Description=%nrbquote(MCDC-defined profile extracts for Areas of 65,000+ population as used in acsprofiles web app), units=%nrbquote(Nation State County PUMA etc), Year=&gyear, CreatePgm=upload_edit_usmcdcprofiles, keyvars=sumlev geocomp state county cbsa ua placefp metrodiv csa necta, keyfmats=sumlev geocomp state county cbsa uauc2k fplace metrodiv csa necta, keyquals= %str( | | | | | | state | | |), DataSource=%str(U.S. Bureau of the Census), SortedBy=State LogRecno, UsageNotes=%nrbquote( ), SubType=1yrpro, SetGroup=us, VarSet=variables, URLMeta=%str(https://mcdc.missouri.edu/data/acs2009/Variables.pdf) ); %doset(libname=acs2009,memname=usmcdcprofiles,template=_template_mcdcpros1, UsageNotes=%nrbquote(+
  • Data set may be rerun to change some names of poverty variables and add CBSA codes to county summaries ), debug=0) ; %doset(memname=_template_mcdcpros3, filetype=acs2009, geouniv=United States, memlabel=%str(MCDC profile extract for all US areas with 20,000+ population based on ~gyear surveys), Description=%nrbquote(MCDC-defined profile extracts for Areas of 20,000+ population as used in acsprofiles web app), units=%nrbquote(Nation State County PUMA etc), Year=&gyear, CreatePgm=cnvt_census_to_mcdc, keyvars=sumlev geocomp state county cbsa ua placefp metrodiv csa necta, keyfmats=sumlev geocomp state county cbsa uauc2k fplace metrodiv csa necta, keyquals= %str( | | | | | | state | | |), DataSource=%str(U.S. Bureau of the Census), SortedBy=State LogRecno, UsageNotes=%nrbquote( ), SubType=3yrpro, SetGroup=us, VarSet=variables, URLMeta=%str(https://mcdc.missouri.edu/data/acs2009/Variables.pdf) ); %doset(memname=_template_mcdcpros5, filetype=acs2009, geouniv=United States, memlabel=%str(MCDC profile extract for almost all geo units (no min pop req) based on ~gyear surveys), Description=%nrbquote(MCDC-defined profile extracts for all Areas as used in acsprofiles web app), units=%nrbquote(Nation State County PUMA place tract MCD etc), Year=&gyear, CreatePgm=usmcdcprofiles5yr, keyvars=sumlev geocomp state county cbsa ua placefp metrodiv csa necta, keyfmats=sumlev geocomp state county cbsa uauc2k fplace metrodiv csa necta, keyquals= %str( | | | | | | state | | |), DataSource=%str(U.S. Bureau of the Census), SortedBy=State LogRecno, UsageNotes=%nrbquote( ), SubType=5yrpro, SetGroup=us, VarSet=variables, URLMeta=%str(https://mcdc.missouri.edu/data/acs2009/Variables.pdf) ); %let gyear=%str(2005-2009); %doset(libname=acs2009,memname=momcdcprofiles5yr,template=_template_mcdcpros5, memlabel=%str(Missouri-only 5-year data), geouniv=Missouri,setgroup=mo,units=county puma place cbsa school township etc, UsageNotes=%nrbquote(+
  • This is our first-ever 5yr data set. Please report any suspicious of missing data you find. Use with caution.
  • There is (or will be shortly) a corresponding us data set with data for the entire country. ), debug=0) ; %let gyear=%str(2005-2009); %doset(libname=acs2009,memname=usmcdcprofiles5yr,template=_template_mcdcpros5, memlabel=%str(5-year data for the entire US), geouniv=United States,setgroup=us,units=%str(Many, from nation to census tract), UsageNotes=%nrbquote(+
  • This is our first-ever 5yr data set. Please report any suspicious of missing data you find. Use with caution.
  • There is a corresponding us data set with data for Missouri only.
  • We ask that you download one state or just a few summary levels at a time, to avoid system overload. ), debug=0) ; %let gyear=%str(2007-2009); %doset(libname=acs2009,memname=usmcdcprofiles3yr,template=_template_mcdcpros3, UsageNotes=%nrbquote(+
  • Data set may be rerun to change some names of poverty variables and add CBSA codes to county summaries ), debug=0) ; %doset(memname=_template_allgeos, filetype=acs2009, geouniv=United States, Description= %str(Geographic headers data for all geo units based on ~gyear surveys), units=%nrbquote(many and varying), Year=&gyear, CreatePgm=, keyvars=sumlev geocomp state county cbsa ua placefp metrodiv csa necta, keyfmats=sumlev geocomp state county cbsa uauc2k fplace metrodiv csa necta, keyquals= %str( | | | | | | state | | |), DataSource=%str(U.S. Bureau of the Census), SortedBy=Sumlev Geocomp State Geocode, UsageNotes=%nrbquote( ), SubType=5yrpro, SetGroup=geos, VarSet=, URLMeta=%str(http://www.census.gov/acs/www/data_documentation/geography/) ); %doset(memname=allgeos,template=_template_allgeos) %doset(memname=allgeos5yr,template=_template_allgeos) ===========================End commented out================================ */ %macro doit(state,stab); %doset(memname=&stab.tracts10, filetype=acs2009, geouniv=&statenm,units=2010 tracts, Description=%nrbquote(MCDC-defined profile extracts aggregated to 2010 tracts), Year=%str(2005-2009), CreatePgm=allocate2trk2010, keyvars=year vintage sumlev county, keyfmats=| | sumlev county, DataSource=%str(U.S. Bureau of the Census), SortedBy=State county tract, UsageNotes=%nrbquote( ), SubType=5yrpro2010tr, SetGroup=&stab, VarSet=variables, URLMeta=%str(https://mcdc.missouri.edu/data/acs2009/Variables.pdf) ); %mend doit; %dostates(n=51); proc sort data=acs2009.datasets out=bysortprio; by sortprio; run; proc print data=bysortprio; by libname notsorted libpath ; id memname; var SortPrio SetGroup SubType VarSet URLmeta GeoUniv years ; title2 'Listing of Selected Fields from acs2009.datasets (Sorted by SortPrio)'; run cancel; proc datasets library=acs2009 nolist; modify datasets; index delete dataset memname; index create dataset=(libname memname) / unique; index create memname; quit; options mprint msglevel=i; %gendshtm(libname=acs2009,debug=1,runprocc=0);