x cd /pub/data/acs2015/Tools; %let pgm=invoke_dosets; filename pgm "&pgm..sas";
/*--Invoke the %doset macro to create observations in the Datasets dataset for this directory.
NOTE: See setups in acs/Tools/invoke_dosets* for creating metadata sets for the base tables.
J. Blodgett, OSEDA, Sep. 2016
-- */
title "Job to Invoke doset Macro for Sets in acs2015, creating acs2015.datasets";
%global todolist;
%*et todolist=ussldu12s5yr ussldl12s5yr ;
%*let todolist=usmcdcprofiles5yr;
%*let todolist=allgeos2008_2015; *<========================================================;
%*let todolist=usmcdcprofiles_2006_20151yr usmcdcprofiles_2006_20153yr uscdslds5yr ;
%*let todolist=ustractsh5yr;
%*let todolist=usmcdcprofilesalt ;
%*let todolist=usmcdcprofiles usmcdcprofilesalt usmcdcprofiles5yr
usmcdcprofiles5yralt;
%*let todolist=usmcdcprofiles;
%let todolist=usbgs5yr; *<=======================================NOTE============================;
%let todolist=uspumas5yr;
%let libnameG=acs2015;
libname acs2015 '/pub/data/acs2015';
/*<=========================Comment out=====================================
*-----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=acs2015,debug=1);
===========================End commented out================================ */
*----------------------------------------------------------------------;
%doset(
memname=usmcdcprofiles , memlabel=%str(Single year 2015 summaries for all areas with pop of at least 65000),
libname =acs2015,
urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=27),
units=us state county place puma cd etc,
years=2015,
universe=United States,
sortprio=1,
keyvars=sumlev state county placefp geocomp cbsa cbsatype,
keyfmats=sumlev state county place geocomp cbsa |,
keyquals= | | | state,
Description = %nrbquote(Data for all large US geographies, 2015 1-year Period Estimates),
UsageNotes=%nrbquote(
- "Large" means a minimum of 65,000 population in 2015.
- Contains both estimates and MOE (margin of error) values
- Margin of error variable names are the same as the estimate names but with "_moe" appended.
- The variables included in this data set are very similar to those included in the Census Bureau dp01 thru dp04 profiles.
They are identical to the variables that appear in the MCDCs ACS Profile reports.
- Many of the variable derivation formulas have been modified from previous cycles to avoid missing values as much as
possible. Note that the MOE values have to be estimated with formulas correpsponding to their deriviation.
These will generally not match exactly with values published by the Bureau.
- The metro area variables cbsa, cbsatype, metdiv and csa are vintage 2015.
),
debug=0);
%doset(
memname=usmcdcprofilesalt , memlabel=%str(Single year 2015 summaries for all areas with pop of at least 65000),
libname =acs2015,
urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=18),
units=us state county place puma cd etc,
years=2015,
universe=United States,
sortprio=1,
keyvars=sumlev state county placefp geocomp cbsa cbsatype,
keyfmats=sumlev state county place geocomp cbsa |,
keyquals= | | | state,
Description = %nrbquote(Data for all large US geographies, 2015 1-year Period Estimates),
UsageNotes=%nrbquote(This "Alt" version has all the _moe variables at the end making it easier to select vars when moes are
not wanted
- "Large" means a minimum of 65,000 population in 2015.
- Contains both estimates and MOE (margin of error) values
- Margin of error variable names are the same as the estimate names but with "_moe" appended.
- The variables included in this data set are very similar to those included in the Census Bureau dp01 thru dp04 profiles.
They are identical to the variables that appear in the MCDCs ACS Profile reports.
- Many of the variable derivation formulas have been modified from previous cycles to avoid missing values as much as
possible. Note that the MOE values have to be estimated with formulas correpsponding to their deriviation.
These will generally not match exactly with values published by the Bureau.
- The metro area variables cbsa, cbsatype, metdiv and csa are vintage 2015.
),
debug=0);
%doset(
memname=allgeos2011_2015,
libname =acs2015,
units=us state county place puma zcta cbsa cd tract etc,
years=%str(2011-2015),
universe=United States,
createpgm=cnvt_geofiles5,
sortprio=5,
keyvars=sumlev state county placefp geocomp cbsa,
keyfmats=sumlev state county place geocomp cbsa,
keyquals= | | | state,
Description = %nrbquote(Geography-only data for all US geographies, regardless of pop size, 5-year Period Estimates),
UsageNotes=%nrbquote(
- See the allgeos1yr and allgeos3yr data sets for comparable data for the 1 and 3-year estimates.
- Census geography (census tracts, BGs, PUMAs, and county subdivisions) are 2010.
- CDs are 113th, SLDS are as of 2015.
- The metro area variables cbsa, cbsatype, metdiv and csa are vintage 2015.
- Data for PR included.
- A state variable value has been assigned for the Sumlev=860 observations, being the primary state for the ZCTA.
),
debug=0);
%doset(
memname=usmcdcprofiles5yr,memlabel=%str(2011-2015 5-year summaries for all areas),
libname =acs2015,
units=us state county place puma zcta cbsa cd tract bg etc,
years=%str(2011-2015),
universe=United States,
createpgm=process_mcdcprofiles5yr,
sortprio=1,
keyvars=sumlev state county placefp geocomp cbsa,
keyfmats=sumlev state county place geocomp cbsa,
keyquals= | | | state,
Description = %nrbquote(Data for all US geographies above tract, regardless of pop size, 5-year Period Estimates),
UsageNotes=%nrbquote(
- There are data here for tracts and block groups (omitted in alt version).
- Census geography (census tracts, BGs, PUMAs, and county subdivisions) are 2010.
- CDs are 114th, SLDS are as of 2015.
- The metro area variables cbsa, cbsatype, metdiv and csa are vintage 2015.
- Data for PR included.
- A state variable value has been assigned for the Sumlev=860 observations, being the primary state for the ZCTA.
- Contains both estimates and MOE (margin of error) values
- Margin of error variable names are the same as the estimate names but with "_moe" appended.
- The variables included in this data set are very similar to those included in the Census Bureau dp01 thru dp04 profiles.
They are identical to the variables that appear in the MCDCs ACS Profile reports.
),
urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=28),
debug=0);
%doset(
memname=usmcdcprofiles5yralt,
Memlabel = %nrbquote(From usmcdcprofiles5yr MOE vars moved to the end, no tracts or bgs) ,
libname=acs2015,
units=us state county place puma cd zcta cbsa etc,
years=%str(2011-2015),
universe=United States,
CreatePgm=mcdcprofiles5yr,
sortprio=1,
keyvars=sumlev state county placefp geocomp cbsa,
keyfmats=sumlev state county place geocomp cbsa,
keyquals= | | | state,
Description = %nrbquote(Alternate version of usmcdcprofiles5yr but with all MOE variables moved to the end of the observations),
UsageNotes=%nrbquote(
- There are no data here for tracts or block groups.
- CDs are 114th, SLDS are as of 2015.
- The metro area variables cbsa, cbsatype, metdiv and csa are vintage 2015.
- A state variable value has been assigned for the Sumlev=860 observations, being the primary state for the ZCTA.
- Contains both estimates and MOE (margin of error) values
- Margin of error variable names are the same as the estimate names but with "_moe" appended.
- The variables included in this data set are very similar to those included in the Census Bureau dp01 thru dp04 profiles.
They are identical to the variables that appear in the MCDCs ACS Profile reports.
),
urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=28),
debug=0);
%doset(
memname=usgeocomps5yr,memlabel=%str(Period Estimates (2011-2015 5-year) for all US Geographic Components),
libname=acs2015,
CreatePgm=mcdcprofiles5yr,
units=str(us state region division etc/geocomp),
years=%str(2011-2015),
universe=United States,
keyvars=sumlev state geocomp,
keyfmats=sumlev state geocomp,
keyquals=%str( | | | ) ,
Description = %nrbquote(Data for all US geographic components, such as urban and rural portions, 5-year Period Estimates),
UsageNotes=%nrbquote(- This is a subset of the usmcdcprofiles5yralt data set,
- Urban and Rural summaries use the 2010-census-based definitions.
- Contains both estimates and MOE (margin of error) values
- Margin of error variable names are the same as the estimate names but with "_moe" appended.
- The variables included in this data set are very similar to those included in the Census Bureau dp01 thru dp04 profiles.
They are identical to the variables that appear in the MCDCs ACS Profile reports.
),
urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=28),
debug=0);
%doset(
memname=usregdiv5yr,
libname=acs2015,urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=28),
CreatePgm=mcdcprofiles5yr,
units=str(us region division),
years=%str(2011-2015),
universe=United States,
keyvars=sumlev ,
keyfmats=sumlev,
Description = %nrbquote(Data for US (nation totals), Regions, and Division),
UsageNotes=%nrbquote(- This is a subset of the usmcdcprofiles5yralt data set,
- No geographic component summaries here. See usgeocomps5yr.
- Contains both estimates and MOE (margin of error) values
- Margin of error variable names are the same as the estimate names but with "_moe" appended.
- The variables included in this data set are very similar to those included in the Census Bureau dp01 thru dp04 profiles.
They are identical to the variables that appear in the MCDCs ACS Profile reports.
),
debug=0);
%doset(
memname=usstcnty5yr,
libname=acs2015,urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=28),
units=State County,
CreatePgm=mcdcprofiles5yr,
years=%str(2011-2015),
universe=United States,
keyvars=sumlev state county cbsa csa metdiv,
keyfmats=sumlev state county cbsa csa metdiv,
Description = %nrbquote(Period Estimates (2011-2015 5-year) for all States, Counties and Equivalents),
UsageNotes=%nrbquote(- Created by merging usmcdcprofiles5yralt with 2010 SF1 data
- From the SF1 dataset we added pop counts from 2000 and 2010 censuses,
- Metro area codes are as of 2015.
- Contains both estimates and MOE (margin of error) values
- Margin of error variable names are the same as the estimate names but with "_moe" appended.
- The variables included in this data set are very similar to those included in the Census Bureau dp01 thru dp04 profiles.
They are identical to the variables that appear in the MCDCs ACS Profile reports.
),
debug=0);
%doset(
memname=usplaces5yr,memlabel=,
libname=acs2015,urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=28),
CreatePgm=mcdcprofiles5yr,
units=%str(place and place/county),
years=%str(2011-2015),
universe=United States,
keyvars=sumlev state county placefp,
keyfmats=sumlev state county place,
keyquals=%str(| | | state),
Description = %nrbquote(Period Estimates (2011-2015 5-year) for all US Cities),
UsageNotes=%nrbquote(- Created by merging usmcdcprofiles5yr2 with 2010 SF1 data.
- Has both summary levels 160 and 155. The latter is place-within-county. No SF1 data for the 155 summaries.
- County variable is blank on 160 level summaries.
- Contains both estimates and MOE (margin of error) values
- Margin of error variable names are the same as the estimate names but with "_moe" appended.
- The variables included in this data set are very similar to those included in the Census Bureau dp01 thru dp04 profiles.
They are identical to the variables that appear in the MCDCs ACS Profile reports.
),
debug=0);
%doset(
memname=uscousubs5yr,memlabel=,
libname=acs2015,urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=28),
CreatePgm=mcdcprofiles5yr,
units=%str(mcds (county subdivisions)),
years=%str(2011-2015),
universe=United States,
keyvars=state county lsadc,
keyfmats=state county lsadc,
Description = %nrbquote(Period Estimates (2011-2015 5-year) for all US County Subdivisions),
UsageNotes=%nrbquote(- Created by merging usmcdcprofiles5yr2 with 2010 SF1 data.
- County subs go by various names in different states. Called Towns in New England and mid-Atlantic states, Townships in Missouri.
- Contains both estimates and MOE (margin of error) values
- Margin of error variable names are the same as the estimate names but with "_moe" appended.
- The variables included in this data set are very similar to those included in the Census Bureau dp01 thru dp04 profiles.
They are identical to the variables that appear in the MCDCs ACS Profile reports.
),
debug=0);
%doset(
memname=usschools5yr,memlabel=,
libname=acs2015,urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=28),
CreatePgm=mcdcprofiles5yr,
units=%str(School District),
years=%str(2011-2015),
universe=United States,
keyvars=sumlev state,
keyfmats=sumlev state,
Description = %nrbquote(Period Estimates (2011-2015 5-year) for all US School Districts),
UsageNotes=%nrbquote(- Created by merging usmcdcprofiles5yr2 with 2010 SF1 data.
- There are 3 kinds of districts: elementary, secondary and unified. The types vary by state.
- Contains both estimates and MOE (margin of error) values
- Margin of error variable names are the same as the estimate names but with "_moe" appended.
- The variables included in this data set are very similar to those included in the Census Bureau dp01 thru dp04 profiles.
They are identical to the variables that appear in the MCDCs ACS Profile reports.
),
debug=0);
libname acs2012 '/pub/data/acs2012';
%doset(
memname=uspumas5yr,memlabel=,
libname=acs2015,urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=28),
CreatePgm=mcdcprofiles5yr,
units=%str(2010 PUMAs),
years=%str(2011-2015),
universe=United States,
keyvars=state PUMA,
keyfmats=state puma,
keyquals=%str(| state),
Description = %nrbquote(Period Estimates (2011-2015 5-year) for all 2010 US Public Use Microdata Areas),
UsageNotes=%nrbquote(
- These are the 2010 PUMAs. They are the same as those used on the same vintage ACS PUMS files.
- There is no SF1 data on this dataset.
- Contains both estimates and MOE (margin of error) values
- Margin of error variable names are the same as the estimate names but with "_moe" appended.
- The variables included in this data set are very similar to those included in the Census Bureau dp01 thru dp04 profiles.
They are identical to the variables that appear in the MCDCs ACS Profile reports.
),
debug=0);
%doset(
memname=usurbareas5yr,memlabel=,
libname=acs2015,urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=28),
CreatePgm=mcdcprofiles5yr,
units=%str(2002 Urban Areas),
years=%str(2011-2015),
universe=United States,
keyvars=,
keyfmats=,
Description = %nrbquote(Period Estimates (2011-2015 5-year) for all US Urban Clusters and Urbanized Areas),
UsageNotes=%nrbquote(- No SF1 data on this data set.
- These are complete areas. There are no within-state summaries and state codes are not defined.
- These are the UAs defined circa 2002 based on pop densities found in the 2k census. 2010 UAs have not yet been assigned.
- Contains both estimates and MOE (margin of error) values
- Margin of error variable names are the same as the estimate names but with "_moe" appended.
- The variables included in this data set are very similar to those included in the Census Bureau dp01 thru dp04 profiles.
They are identical to the variables that appear in the MCDCs ACS Profile reports.
),
debug=0);
%doset(
memname=usmetros5yr,memlabel=,
libname=acs2015,urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=28),
CreatePgm=mcdcprofiles5yr,
units=%str(2010 Metro Areas),
years=%str(2011-2015),
universe=United States,
keyvars=sumlev cbsa csa metdiv state,
keyfmats=sumlev cbsa csa metrodiv state,
Description = %nrbquote(Period Estimates (2011-2015 5-year) for all US CBSAs, CSAs, Metro Divs and New England Metro Areas),
UsageNotes=%nrbquote(- Created by merging usmcdcprofiles5yr2 with 2010 SF1 data.
- Contains complete and within-state summaries.
- CBSA is blanket term for Metropolitan and Micropolitan Statistical Areas.
- Contains both estimates and MOE (margin of error) values
- Margin of error variable names are the same as the estimate names but with "_moe" appended.
),
debug=0);
%doset(
memname=uszctas5yr,memlabel=,
CreatePgm=mcdcprofiles5yr,
units=%str(ZCTAs),
years=%str(2011-2015),
universe=United States,
keyvars=state,
keyfmats=state,
Description = %nrbquote(Period Estimates (2011-2015 5-year) for all US ZCTAs,),
UsageNotes=%nrbquote(- Dataset has been enhanced by merging it with selected items from the MCDC
sf1x.uszctas860 dataset, which in turn was created by aggregation of 861-level sf1x summaries and then merging
seleted geographic info from the georef.zcta_master dataset.
- Contains level 860 summaries: complete ZCTA. But we have added geocodes indicating primary state and county.
- This dataset is very different from the 2006-2010 version which we aggregated ourselves from tract level data and
which contain no moe values.
),
urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=28),
debug=0);
run;
%doset(
memname=usamindianetc5yr,memlabel=,
libname=acs2015,urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=28),
CreatePgm=mcdcprofiles5yr,
units=%str(American Indian Resevations etc),
years=%str(2011-2015),
universe=United States,
keyvars=sumlev state,
keyfmats=sumlev state,
Description = %nrbquote(Period Estimates (2011-2015 5-year) for all US American Indian Reservations and Similar Areas),
UsageNotes=%nrbquote(
- Contains both estimates and MOE (margin of error) values
- Margin of error variable names are the same as the estimate names but with "_moe" appended.
),
debug=0);
%doset(
memname=ustracts5yr,memlabel=,
libname=acs2015,urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=28),
CreatePgm=mcdcprofiles5yr,
units=%str(2010 census tract),
years=%str(2011-2015),
universe=United States,
keyvars=sumlev state county cbsa,
keyfmats=sumlev state county cbsa,
Description = %nrbquote(Period Estimates (2011-2015 5-year) for all US Census Tracts),
UsageNotes=%nrbquote(- Created by merging usmcdcprofiles5yalt with 2010 SF1 data.
- These are complete tracts - summary level 140.
- Contains both estimates and MOE (margin of error) values
- Margin of error variable names are the same as the estimate names but with "_moe" appended.
- The variables included in this data set are very similar to those included in the Census Bureau dp01 thru dp04 profiles.
They are identical to the variables that appear in the MCDCs ACS Profile reports.
- Some tracts in Madison and Oneida counties, NY are new "2015" tracts and will not match with sf1 data.
),
debug=0);
%doset(
memname=usbgs5yr,memlabel=,
libname=acs2015,urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=28),
CreatePgm=usbgprofiles,
units=%str(2010 Block Groups),
years=%str(2011-2015),
universe=United States,
keyvars=state county,
keyfmats=state county,
Description = %nrbquote(Period Estimates (2011-2015 5-year) for all US block groups),
UsageNotes=%nrbquote(
- This is a messy data set. The Bureau data at this level is not the same as for all other levels - there are
fewer variables available to us on the summary files. Basic profile data are not available as such from the Bureau.
- The job newbgvars.sas creates a few new varibles that came to use not defined but for which we were able to
get the data from some alternate formulae that only work for BGs. There are no MOEs for these added variables.
- These are complete block groups (summary level 150)
- Extreme caution should be excercised when looking at these data for any specific BG. The MOE values tend to be very
large, making the data of little or no value for evaluating the BG. These data are more intended for applications that
require aggregating data locally defined geographies or for circular area estimating.
- Key variables from the 2010 census (SF1) have been added so you can compare them with the ACS estimates. These variables
all have names with "sf1" suffixes.
- Some BGs in Madison and Oneida counties, NY are new "2015" BGs and will not match with sf1 data.
- Also a few BGs in LA county, CA and in Pima County, AZ do not have SF1 data because they were published using diff codes.
- Contains both estimates and MOE (margin of error) values.
- Margin of error variable names are the same as the estimate names but with "_moe" appended.
),
debug=0);
%doset(
libname=acs2015,urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=28),
memname=uscdslds5yr,memlabel=%bquote(Latest CD and State Leg District level summaries),sortprio=3,
CreatePgm=mcdcprofiles5yr,
units=%str(2015 SLDs, 113th CDs),
years=%str(2011-2015),
universe=United States,
keyvars=sumlev state,
keyfmats=sumlev state,
sortedby=state,
Description = %nrbquote(In the 2011 cycle we had to estimate data for these units. Now they are official data),
UsageNotes=%nrbquote(
- The 113th congress was the one elected in 2012.
- The SLDs (state legislative districts) are the new one created by post-2010 redistricting.
- These are now official data from the Bureau. In prior years we had to estimate these data.
- Nebraska and DC have no lower chambers.
),
debug=0);
run;
/*<=========================Comment out=====================================
%doset(
memname=usmcdcprofiles_2006_20151yr,memlabel=,
libname =acs2015,
createPgm=create_usmcdcprofiles_since2006,
sortedby=geoid years,
urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=28),
units=us state county place puma cd etc,
years=%str(2006 thru 2015),
universe=United States,
sortprio=1,
keyvars=years sumlev state county placefp geocomp cbsa vintage,
keyfmats= | sumlev state county place geocomp cbsa,
keyquals= | | | | state,
Description = %nrbquote(Data for all large US geographies (65K+), all single-year Estimates since 2006),
UsageNotes=%nrbquote(These are the usmcdcprofiles data sets from acs2006, acs2007, etc. thru acs2015 - concatenated
- All geography is as of the vintage year. So, for example, the CBSAs for 2007-2009 are not the same as those for 2011-2015.
- Contains both estimates and MOE (margin of error) values
- Margin of error variable names are the same as the estimate names but with "_moe" appended.
),
debug=0);
===========================End commented out================================ */
*proc sort data=acs2015.datasets out=bysortprio; *by sortprio ; *run;
proc datasets library=acs2015 nolist;
modify datasets;
index delete dataset memname;
index create dataset=(libname memname) / unique;
index create memname;
quit;
options mprint msglevel=i;
%gendshtm(libname=acs2015,debug=1,runprocc=1);