x cd /data/acs2022/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 programs in acs/Tools/invoke_dosets* for creating metadata sets for the base tables.
*/
%include '/pub/sas/autoexec.sas';
%global todolist acsYear acs5Year;
%let acsYear = 2022;
%let acs5Year = 2018-2022;
%let todolist = allgeos2018_2022 allgeos2022 usamindianetc5yr usbgs5yr uscdslds5yr uscousubs5yr usgeocomps5yr usmcdcprofiles usmcdcprofiles5yr usmetros5yr usplaces5yr uspumas5yr usregdiv5yr usschools5yr usstcnty5yr ustracts5yr usurbareas5yr uszctas5yr variables1yr variables5yr;
libname acs&acsYear "/pub/data/acs&acsYear";
options mprint nomlogic;
title "Job to Invoke doset macro for datasets in acs&acsYear, creating acs&acsYear..datasets";
/*
Run the following step only once. If you need to rerun or start over, delete the datasets dataset first.
doset will not allow initialize mode if the datasets set already exists.
Comment out this line if running program multiple times.
*/
%doset(mode=initialize, libname=acs&acsYear, debug=1);
%doset(
memname=allgeos&acsYear,
libname=acs&acsYear,
units=us state county place puma zcta cbsa cd tract etc,
years=&acsYear,
universe=United States,
sortprio=5,
Description = %nrbquote(Geographic identifiers for all US geographies included in 1-year period estimates),
UsageNotes=%nrbquote(
- See the allgeos5yr data set for comparable data for the 5-year estimates.
- Census geography vintages vary. See the Census Bureau's Vintage of Geographic Areas for ACS Estimates page for specifics.
- CDs are 118th, SLDS are as of 2022.
),
debug=0
);
%doset(
memname=allgeos2018_2022,
libname=acs&acsYear,
units=us state county place puma zcta cbsa cd tract etc,
years=&acs5Year,
universe=United States,
sortprio=5,
Description = %nrbquote(Geographic identifiers for all US geographies included in 5-year period estimates),
UsageNotes=%nrbquote(
- See the allgeos1yr data set for comparable data for the 1-year estimates.
- Census geography (census tracts, BGs, PUMAs, and county subdivisions) varies. See the Census Bureau's Vintage of Geographic Areas for ACS Estimates page for specifics.
- CDs are 118th, SLDS are as of 2022.
- The metro area variables cbsa, cbsatype, metdiv and csa are vintage 2020.
- 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=usmcdcprofiles,
libname=acs&acsYear,
sortedby=geoid,
urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=45),
units=us state county place puma cd etc,
years=&acsYear,
universe=United States,
sortprio=1,
Description = %nrbquote(Data for large US geographies (65K+), 1-year period estimates),
UsageNotes=%nrbquote(
- Includes nation, regions, divisions, states, counties, county subdivisions, places, metro areas, urban areas, congressional districts, PUMAs, and school districts for all areas larger than 65,000 population.
- CDs are 118th. The metro area variables cbsa, cbsatype, metdiv and csa are vintage 2020.
- Data for PR included.
- 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=usmcdcprofiles5yr,
libname=acs&acsYear,
units=us state county place puma zcta cbsa cd tract bg etc,
years=&acs5Year,
universe=United States,
sortprio=1,
Description = %nrbquote(Data for all US geographies above tract, 5-year period estimates),
UsageNotes=%nrbquote(
- Census geography (census tracts, BGs, PUMAs, and county subdivisions) varies. See the Census Bureau's Vintage of Geographic Areas for ACS Estimates page for specifics.
- CDs are 118th, SLDS are as of 2022.
- The metro area variables cbsa, cbsatype, metdiv and csa are vintage 2020.
- 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 MCDC's ACS Profile reports.
),
urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=47),
debug=0
);
%doset(
memname=usbgs5yr,
libname=acs&acsYear,
urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=47),
units=%str(2020 Block Groups),
years=&acs5Year,
universe=United States,
Description = %nrbquote(Period estimates (&acs5Year 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.
- 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.
- 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,
libname=acs&acsYear,
urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=47),
units=%str(2020 census tract),
years=&acs5Year,
universe=United States,
Description = %nrbquote(Period estimates (&acs5Year 5-year) for all US census tracts),
UsageNotes=%nrbquote(
- 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 MCDC's ACS Profile reports.
),
debug=0
);
%doset(
memname=usamindianetc5yr,
libname=acs&acsYear,
urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=47),
units=%str(American Indian Resevations etc),
years=&acs5Year,
universe=United States,
Description = %nrbquote(Period estimates (&acs5Year 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(
libname=acs&acsYear,
urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=47),
memname=uscdslds5yr,
sortprio=3,
units=%str(2022 SLDs, 118th CDs),
years=&acs5Year,
universe=United States,
sortedby=state,
Description = %nrbquote(Period estimates (&acs5Year 5-year) for all US congressional districts and state legislative districts),
UsageNotes=%nrbquote(
- The 118th congress was the one elected in 2022.
- The SLDs (state legislative districts) are the ones in effect as of the 2022 legislative session year.
- Nebraska and DC have no lower state legislature chambers.
),
debug=0
);
%doset(
memname=uscousubs5yr,
libname=acs&acsYear,
urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=47),
units=%str(MCDs (county subdivisions)),
years=&acs5Year,
universe=United States,
Description = %nrbquote(Period estimates (&acs5Year 5-year) for all US county subdivisions),
UsageNotes=%nrbquote(
- County subdivisions go by various names in different states. Called "towns" in New England and mid-Atlantic states, "townships" in Missouri. The Bureau calls them "minor civil divisions" (MCDs).
- 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=usgeocomps5yr,
libname=acs&acsYear,
units=str(us state region division etc/geocomp),
years=&acs5Year,
universe=United States,
Description = %nrbquote(Data for all US geographic components, such as urban and rural portions, 5-year period estimates),
UsageNotes=%nrbquote(
- Urban and rural summaries use the 2020-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.
),
urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=47),
debug=0
);
%doset(
memname=usmetros5yr,
libname=acs&acsYear,
urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=47),
units=%str(2020 Metro Areas),
years=&acs5Year,
universe=United States,
Description = %nrbquote(Period estimates (&acs5Year 5-year) for all US CBSAs and New England metro areas),
UsageNotes=%nrbquote(
- These are the CBSAs and New England metros effective as of March 2020.
- Contains complete and within-state summaries.
- CBSA is the 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=usplaces5yr,
libname=acs&acsYear,
urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=47),
units=%str(place and place/county),
years=&acs5Year,
universe=United States,
Description = %nrbquote(Period estimates (&acs5Year 5-year) for all US places: cities, towns, villages, and CDPs),
UsageNotes=%nrbquote(
- Has both summary levels 160 and 155. The latter is place-within-county (since places can cross county borders).
- 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.
),
debug=0
);
%doset(
memname=uspumas5yr,
libname=acs&acsYear,
urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=47),
units=%str(2022 PUMAs),
years=&acs5Year,
universe=United States,
Description = %nrbquote(Period estimates (&acs5Year 5-year) for all 2022 US Public Use Microsample Areas),
UsageNotes=%nrbquote(
- These are the 2022 PUMAs.
- 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=usregdiv5yr,
libname=acs&acsYear,
urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=47),
units=str(us region division),
years=&acs5Year,
universe=United States,
Description = %nrbquote(Data for US (national totals), census regions, and census divisions),
UsageNotes=%nrbquote(
- This is a subset of the usmcdcprofiles5yr 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.
),
debug=0
);
%doset(
memname=usschools5yr,
libname=acs&acsYear,
urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=47),
units=%str(School District),
years=&acs5Year,
universe=United States,
Description = %nrbquote(Period estimates (&acs5Year 5-year) for all US school districts),
UsageNotes=%nrbquote(
- There are three 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.
),
debug=0
);
%doset(
memname=usstcnty5yr,
libname=acs&acsYear,
urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=47),
units=State County,
years=&acs5Year,
universe=United States,
Description = %nrbquote(Period estimates (&acs5Year 5-year) for all states, counties, and equivalents),
UsageNotes=%nrbquote(
- Metro area codes are as defined in March 2020.
- 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 MCDC's ACS Profile reports.
),
debug=0
);
%doset(
memname=usurbareas5yr,
libname=acs&acsYear,
urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=47),
units=%str(2020 Urban Areas),
years=&acs5Year,
universe=United States,
Description = %nrbquote(Period estimates (&acs5Year 5-year) for all US urban areas),
UsageNotes=%nrbquote(
- These are complete areas. There are no within-state summaries and state codes are not defined.
- These are the new UAs defined in 2022 based on population densities from the 2020 census. The new Urban Area definition omits urban clusters and is completely different from the pre-2020 Urbanized Area definition.
- 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,
libname=acs&acsYear,
units=%str(ZCTAs),
years=&acs5Year,
universe=United States,
Description = %nrbquote(Period estimates (&acs5Year 5-year) for all US ZCTAs,),
UsageNotes=%nrbquote(
- Dataset has been enhanced by merging it with selected items from the MCDC's ZCTA datasets.
- Contains level 860 summaries: complete ZCTA. But where possible, we have added geocodes indicating primary state and county.
),
urlmeta=%str(https://mcdc.missouri.edu/applications/acs/profiles/variables.php?p=47),
debug=0
);
proc sort data=acs&acsYear..datasets out=bysortprio;
by sortprio;
run;
proc datasets library=acs&acsYear nolist;
modify datasets;
index delete dataset memname;
index create dataset=(libname memname) / unique;
index create memname;
quit;
options mprint msglevel=i;
%gendshtm(libname=acs&acsYear, debug=1, runprocc=1);
%include sascode(notify);