x cd /pub/data/acs2008/Tools; %let pgm=invoke_dosets_profiles; filename pgm "&pgm..sas";
/*--Invoke the %doset macro to create observations in the Datasets dataset for the acs2008 directory which contains key profiles
data sets as well as geography sets. Does not include basetbls data which is handled separately.
J. Blodgett, OSEDA, Sept, 2009
-- */
title "Job to Invoke doset Macro for Sets in acs2008";
libname acs2008 '/pub/data/acs2008';
libname user '/SAS_temp/user';
%let libnameg=acs2008;
%let gyear=2008;
*-----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=acs2008,debug=1);
*----------------------------------------------------------------------;
options mprint;
%doset(memname=_template_mcdcpros1,
filetype=acs2008,
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(
- These are 1-year estimates based on ACS data collected in ~gyear .
- This dataset was created on a different system and copied to the archive.
- Look for corresponding data set with "3yr" or "5yr" suffix to get similar data for multi-year periods.
- Variables are about 90 pct based directly upon items in Census Bureau profile tables. But some we derived from reading the base
tables. See Variables.pdf file in this directory for summary report.
- Specify a filter of State Equal To 29 to select Missouri summaries only. Change 29 to 06 to select California data, etc.
- Expect some missing values due to the Bureau policy not to release tables deemed statistically unreliable.
- MOE (Margin of [sampling] Error) data are stored here along with the estimates. They all have names of form <estname>_moe
- Standard geographic header info from Bureau geo txt files included.
),
SubType=1yrpro,
SetGroup=us,
VarSet=variables,
URLMeta=%str(https://mcdc.missouri.edu/data/acs2008/Variables.pdf)
);
%doset(libname=acs2008,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) ;
%let gyear=%str(2006-2008);
%doset(memname=_template_mcdcpros3,
filetype=acs2008,
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(- These are 3-year period estimates based on ACS data collected in ~gyear .
- Variables are about 90 pct based directly upon items in Census Bureau profile tables. But some we derived from reading the base
tables. See Variables.pdf file in this directory for summary report.
- Specify a filter of State Equal To 29 to select Missouri summaries only. Change 29 to 06 to select California data, etc.
- Expect some missing values due to the Bureau policy not to release tables deemed statistically unreliable.
- MOE (Margin of [sampling] Error) data are stored here along with the estimates. They all have names of form <estname>_moe
- Standard geographic header info from Bureau geo txt files included.
),
SubType=3yrpro,
SetGroup=us,
VarSet=variables,
URLMeta=%str(https://mcdc.missouri.edu/data/acs2008/Variables.pdf)
);
%doset(libname=acs2008,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) ;
proc sort data=acs2008.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 acs2008.datasets (Sorted by SortPrio)';
run ;
proc datasets library=acs2008 nolist;
modify datasets;
index delete dataset memname;
index create dataset=(libname memname) / unique;
index create memname;
quit;
options mprint msglevel=i;
%gendshtm(libname=acs2008,debug=1,runprocc=1);