x cd /pub/data/corrlst/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, Jan., 2003
-- */
libname corrlst '/pub/data/corrlst';
libname cl (corrlst);
*-----Run this step ONLY ONCE------------------------------------------;
%*doset(mode=initialize,
libname=corrlst,memname=badblks,debug=1);
;
%*let todo=zip07_cbsa06 ; *<=======================================================================;
%let todo=zip_2_zcta10; *<=====9-8-14============================================================;
/* ========================begin comment====================================
%doset(libname=corrlst,
memname=zip07_cbsa06,
memlabel=%str(ZIP/ZIP+2/ZIP+4 to CBSA circa 2007),
geouniv=UnitedStates,
units=%str(ZIP ZIP+2 ZIP+4/CBSA),
Year=2007,
CreatePgm=zip07_cbsa06,
Keywords=ZIP CBSA county equivalency correlation 2007,
Description=%nrbquote(This data set can be used to associate vintage 2007 ZIP code areas with 2006-vintage
micropolitan and metropolitan statistical areas (aka CBSAs). Each obs represents a 5-digit ZIP and an optional
single or interval of 2 or 4-digit ZIP subareas. These are correlated with a combination of county, CBSA, Metropolitan
Division and Combined Statistical Area codes and names.),
keyvars=state county cbsa metrodiv csa,
keyfmats=state county cbsa metrodiv csa,
keyquals=,
DataSource=%str(Census Bureau),
SortedBy=state zip5 zipsfxs,
UsageNotes=%nrbquote(
- We downloaded a .zip file from the Census Bureau site
http://www.census.gov/population/www/metroareas/metroarea.html with over 2.8 million records.
- We
ran a conversion program that collapsed consecutive records where the ZIP suffix (which could be either blank, 2 or 4 digits) had
consecutive values (i.e. differing by 1)
to keep a single observation for a ZIP-suffix interval. So if 10 consecutive records has ZIP sfx values
of 1001, 1002,...,1010 then we created a single output obs with "1001-1010" as the value of ZIPsfxs.
- We were able to condense the 2.82 million input recs into just under 400,000 interval records with no loss of information.
),
URLMeta=%str(http://www.census.gov/population/www/metroareas/files/zip_cbsa_doc.txt),
debug=0)
;
%doset(libname=corrlst,
memname=moplco2k,
memlabel=%str(Missouri Place to County, 2000),
geouniv=Missouri,
units=%str(Place/County),
Year=2000,
CreatePgm=place_to_county,
Keywords=place county equivalency correlation 2000,
Description=%nrbquote(Use this dataset to see what county or counties each place (city) is
associated with. If a place is associated with more than one county then there will be more than
one observation for the place. The dataset is sorted so that the first observation for a place has
the "primary" county identified, i.e. the county with which the place has the largest intersection.),
keyvars=placefp county,
keyfmats=fplace county,
keyquals=state |,
DataSource=%str(2000 Census - Public Law File 94 Geographic Headers file),
SortedBy=placefp descending pop100,
UsageNotes=%nrbquote(- No names are on the dataset, just codes. Use the Key Variables section on this page
to see names associated with these codes.
- You can access the uspl2co
dataset and use a State Equals 29 filter to get comparable data but with geographic name
variables.
- See the complete (and very long) US report on the web at
https://mcdc.missouri.edu/reports/geography/us_place_to_county.html.
- A complete set of these state level
datasets are contained within the plc2cnty2k subdirectory.
),
SubType=SSplco2k,
SetGroup=,
VarSet=,
URLMeta=,
filters=,
debug=1)
%doset(libname=corrlst,
memname=ksplco2k,
memlabel=%str(Kansas Place to County, 2000),
geouniv=Kansas,
units=%str(Place/County),
Year=2000,
CreatePgm=place_to_county,
Keywords=place county equivalency correlation 2000,
Description=%nrbquote(Use this dataset to see what county or counties each place (city) is
associated with. If a place is associated with more than one county then there will be more than
one observation for the place. The dataset is sorted so that the first observation for a place has
the "primary" county identified, i.e. the county with which the place has the largest intersection.),
keyvars=placefp county,
keyfmats=fplace county,
keyquals=state |,
DataSource=%str(2000 Census - Public Law File 94 Geographic Headers file),
SortedBy=placefp descending pop100,
UsageNotes=%nrbquote(- No names are on the dataset, just codes. Use the Key Variables section on this page
to see names associated with these codes.
- You can access the uspl2co
dataset and use a State Equals 20 filter to get comparable data but with geographic name
variables.
- See the complete (and very long) US report on the web at
https://mcdc.missouri.edu/reports/geography/us_place_to_county.html.
- A complete set of these state level
datasets are contained within the plc2cnty2k subdirectory.
),
SubType=SSplco2k,
SetGroup=,
VarSet=,
URLMeta=,
filters=,
debug=1)
%doset(libname=corrlst,
memname=usplco2k,
geouniv=UnitedStates,
units=%str(Place/County),
Year=2000,
CreatePgm=place_to_county,
Keywords=US place county equivalency correlation 2000,
Description=%nrbquote(Use this national dataset to see what county or counties each place (city) is
associated with. If a place is associated with more than one county then there will be more than
one observation for the place. The dataset is sorted so that the first observation for a place has
the "primary" county identified, i.e. the county with which the place has the largest intersection.),
keyvars=placefp county state Primary,
keyfmats=fplace county state,
keyquals=state ,
DataSource=%str(2000 Census - Public Law File 94 Geographic Headers file),
SortedBy=State placefp descending pop100,
UsageNotes=%nrbquote(- All geocodes - county, place and metro area - are as of the 2000 census.
- You can use the filter Primary EQUALS 1 to select rows where the county is the primary one for the
place, i.e. the one with the largest portion of the place population.
- See the complete US report on the web at
https://mcdc.missouri.edu/reports/geography/us_place_to_county.html.
- The Geocorr web application is capable of
generating CSV files similar to this dataset but with different kinds of geography. E.g. you could generate a
report or file with 2003 metro area codes instead of the 2000 vintage metro area codes on this dataset.
),
debug=1)
%doset(libname=corrlst,
memname=us_stzcta5_county,
geouniv=UnitedStates,
units=%str(State/ZCTA5/County),
Year=2000,
CreatePgm=us_stzcta5_county,
Keywords=US 5-digit ZIP ZCTA county equivalency correlation 2000,
Description=%nrbquote(U.S. ZCTA5 (within state) to County equivalency dataset. Can be used to determine
what county or counties each ZCTA5 falls within and what the 2000 census population was for each ZIP/County
intersection.),
keyvars=county state rank,
keyfmats=county state ,
keyquals=,
DataSource=%str(2000 Census - Summary File 1 Geographic Headers file),
SortedBy=State ZCTA5 descending pop100,
UsageNotes=%nrbquote(- Geography - ZCTA5 and county - are as of the 2000 census.
- The Geocorr web application is capable of
generating CSV files similar to this dataset but with different kinds of geography. E.g. you could generate a
report or file showing how ZCTA codes within state relate to metro areas, urban/rural areas, 108th Congressional Districts, etc.
- The counties associated with a ZCTA are ranked according to the size of the ZCTA/County population. If you select
with a filter of Rank EQUALS 1 you will just get data for the "primary" county for each ZCTA.
- ZCTA stands for ZIP Census Tabulation Area and very much resembles a 5-digit ZIP code. See
The ZIP Code Resources Page for details.
),
SubType=,
SetGroup=us,
debug=1)
%doset(libname=corrlst,
memname=moco2mpo,
geouniv=Missouri,
units=%str(County/MPO),
Year=2000,
CreatePgm=moco2mpo,
Keywords=county MPO equivalency correlation 2000,
Description=%nrbquote(Shows how Missouri counties relate to Metro Planning Organizations based on cenus 2000
population.),
keyvars=county mpo,
keyfmats=county mponame,
keyquals=,
DataSource=%str(Derived from the moblk2mpo Equivalency dataset in this directory),
SortedBy=county mpo,
UsageNotes=%nrbquote(- The 1-digit MPO code used by MoDOT are used here to ID the MPOs. The official
Census Bureau codes, used on the CTPP files, are 4-digit codes that are like MSA codes with 1 added. E.g. the
code for the St. Louis MPO is 7041, while the MSA code is 7040.
),
SubType=,
SetGroup=us,
debug=1)
===========================End commented out================================ */
%doset(libname=corrlst,memname=zip_2_zcta10,Description=%str(5-digit US ZIP Codes related 2010 ZCTA codes),
geouniv=UnitedStates,units=%str(ZIP/ZCTA), Year=2010, Createpgm=zip2zcta,
datasource=%str(John Snow, Inc),
sortedby=zip,
UsageNotes=%nrbquote(- These data downloaded from the web from xls file provided by John Snow, Inc.
at http://udsmapper.org/docs/Zip_to_ZCTA_crosswalk_2010_JSI.xls in May, 2012 .
- See downloadeded file (saved as csv) at: https://mcdc.missouri.edu/pub/data/corrlst/Zip_to_ZCTA_crosswalk_2010_JSI.csv
- Data downloaded May, 2012 . See comment in createpgm for site details.
- Includes both standard and special type ZIP codes. For standard the ZIP and ZCTA are the same code.
- The real value of the set is to link the non-standard ZIPs to the ZCTAs in which they are located.
- The CityName field makes this dataset useful as a source for putting geographic names with ZIPs.
- ZIP/ZCTA 17270 (in Pennsylvania) is missing from the data set.
- https://mcdc.missouri.edu/sas/formats/Szpzcta.sas contains source code for $zpzcta SAS format lookup table.
- ziptype values are: M=Military P=PO Box Only S=Standard U=Unique (companies, orgs, etc) L=Legacy (no longer exist).
- When creating this data set duplicate entries for ZIP values were deleted.
),
keyvars=ziptype stab,
debug=0);
/*<=========================Comment out=====================================
%doset(libname=corrlst,memname=mozctacd113,
Description=%str(Relates 2010 5-digit ZIP Codes to 113th (elected 2012) Congressional District for Mo),
geouniv=Missouri,units=%str(ZCTA/CDs), Year=2012, Createpgm=mozip2cdslds2012,
sortedby=zcta,
UsageNotes=%nrbquote(- Created from 3 Mo block-level datasets: corrlst.moblk2cdslds2011, corrlst.moblkzcta10,
pl942010.mosums (to get block pops from 2010 census)
- These are the 2010 vintage ZCTAs. The 113th Congressional Districts were created in 2011 and finally approved in 2012.
- the 2010 census total pop count is used as a weight variable. Each obs contains the 2010 pop in the ZCTA/CD intersection
and the afact variable indicates the decimal portion of the ZCTAs total pop residing in that CD.
),
debug=0);
%doset(libname=corrlst,memname=mozctahouse12,
Description=%str(Relates 2010 5-digit ZIP Codes to Missouri House (state legislative) districts as redrwan in 2011.),
geouniv=Missouri,units=%str(ZCTA/SLDLs), Year=2012, Createpgm=mozip2cdslds2012,
datasource=Missouri redistricting committee,
sortedby=zcta,
UsageNotes=%nrbquote(- Created from equivalency file received from the state of Missouri (via GRC)
- These are the 2010 vintage ZCTAs. The House Districts were redrawn in 2011.
- the 2010 census total pop count is used as a weight variable. Each obs contains the 2010 pop in the ZCTA/CD intersection
and the afact variable indicates the decimal portion of the ZCTAs total pop residing in that CD.
),
debug=0);
%doset(libname=corrlst,memname=mozctasenate12,
Description=%str(Relates 2010 5-digit ZIP Codes to Missouri Senate (state legislative) districts as redrwan in 2011.),
geouniv=Missouri,units=%str(ZCTA/SLDUs), Year=2012, Createpgm=mozip2cdslds2012,
datasource=Missouri redistricting committee,
sortedby=zcta,
UsageNotes=%nrbquote(- Created from equivalency file received from the state of Missouri (via GRC)
- These are the 2010 vintage ZCTAs. The Senate Districts were redrawn in 2011.
- the 2010 census total pop count is used as a weight variable. Each obs contains the 2010 pop in the ZCTA/CD intersection
and the afact variable indicates the decimal portion of the ZCTAs total pop residing in that CD.
),
debug=0);
%doset(libname=corrlst,memname=moblk2cdslds2011,
Description=%str(Relates 2010 Missouri census blocks to each of the 3 redrawn voting districts for 2011: CDs, state House & Senate),
geouniv=Missouri,units=%str(block cd113 slds), Year=2012, Createpgm=cnvt_blkequivs_mocdslds2012,
sortedby=county tract block,
UsageNotes=%nrbquote(- Created from equivalency files received from the state of Missouri (via GRC).
- 3 files from GRC were dbf files: RANDCOMPROMISE.DBF (CDs), HOUSE APPORTIONMENT PLAN, SENATE APPORTIONMENT PLAN - all
accessible in this corrlst directory.
- There is no census pop count included . And no allocation factors. Blocks must be entirely within each district.
),
debug=0);
==========================end comment====================================== */
%doset(libname=corrlst,memname=uscntypuma12,
Description=%str(Relates US counties to post-2010 PUMAs),
geouniv=United States,units=%str(county puma), Year=2012, Createpgm=uscntypuma12,
sortedby=state county,
UsageNotes=%nrbquote(- Created from equivalency file uscntypuma12.csv generated Nov 2013 using geocorr12
- These 2010 PUMAs were first used with the vintage 2012 ACS data.
- 2012 pop estimate used as weight variable.
),
debug=0);
proc sort data=corrlst.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 corrlst.datasets (Sorted by SortPrio)';
run ;
proc datasets library=corrlst nolist;
modify datasets;
index delete dataset memname;
index create dataset=(libname memname) / unique;
index create memname;
quit;
options mprint msglevel=i;
%gendshtm(libname=corrlst,debug=1,runprocc=1);