x cd /pub/data/popests/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, Jul., 2003
Rev. 5/05 to add xxcom04 datasets.
7/05 to add xxsc04 datasets.
8/06 to add casrh05 datasets.
9/06 to remove code related to casrh06 and later datasets which will now be processed in
invoke_dosets_casrh setup.
3/08 to document county level com07 datasets.
8/08 for latest hu estimates sets.
12/08 for uscomnst08 set. (and 12/09 for the nst09 ests.)
3/10 for vintage 2009 com datasets.
3/15 to regenerate after a lot of archiving but before processing any vintage 2014 estimates.
-- */
title "Job to Invoke doset Macro for Sets in popests, creating popests.datasets";
%include '/pub/sas/autoexec.sas';
options mprint symbolgen;
%let libnameg=popests;
libname popests '/pub/data/popests';
libname archives '/pub/data/popests/archives';
*-----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=popests,debug=1);
*----------------------------------------------------------------------;
***<====only datasets names in this list get processed this run (if not commented out) =============;
/*
%let todo=uscom06 mocom06 mocom06t mocomregns06 uscomcbsas06;
%let todo=ushuest2006 mohuest2006;
%let todo=uscomnst07;
%let todo=uscom07 mocom07 mocom07t mocomregns07 uscomcbsas07;
%let todo=ussc07 mosc07;
%let todo=ushuest2007 mohuest2007;
%let todo=uscomnst08;
%let todo=uscom08 mocom08 mocom08t mocomregns08 uscomcbsas08;
%let todo=uscomnst09;
%let todo=uscom09 mocom09 mocom09t mocomregns09 uscomcbsas09;
%let todo=ustrends2;
%let todo=_template_uscom uscom99 uscom06 mocom06;
%let todo=_template_ussc _template_mosc ushuest2009 mohuest2009 ussc09 mosc09 ushuest2009 mohuest2009;
%let todo=ushuest2018 mohuest2018;
*/
%let todo= _template_mocomt mocom09t mocom18t;
/* NEW:
%let todo= _template_mocom mocom09 mocom18;
%let todo= mocomregns09 mocomregns16 mocomregns17 mocomregns18 monchsbridged19xx monchsbridged19xx_sumry monchsbridged20xx monchsbridged20xx_sumry monchsbridged201x monchsbridged201x_sumry;
*/
*--------------------------------Define all templates first------------------------------------------------------------*;
/* =======================Begin comment================
/*<=====Special 1-time run to repair problems with sortprio fields on datasets dataset. ========================== ;
data repaired; set popests.datasets;
if sortprio='X' then sortprio=' '; *---following code was copied and pasted from doset macro---;
if SortPrio=" " and not (memname=:'_template') then select(GeoUniv);
when("Missouri","MISSOURI") SortPrio="1";
when("UnitedStates","United_States","United States") SortPrio="3";
when ("Illinois","Kansas","ILLINOIS","KANSAS") SortPrio="5";
otherwise SortPrio="7";
end;
run;
data popests.datasets; set repaired; run;
======================End comment================== */
%*let todo=nothing; *<====we are running this 3-11-15 just to regenerate the datasets dataset and Datasets.html after lots of editing and migrating of data.-------------------------------------------;
%let gyear=2005; %let gyr=05;
%doset(mode=,libname=popests,memname=_template_mocomt,
geouniv=Missouri,units=variable,
Years=%str(2000-~Gyear),
CreatePgm=uscomYY.cnvt,
Description=%nrbquote(This is the mocom~gyr data set transposed so that the rows are the data items and each column contains
data for 1 geographic area. The names of the variables on this data set are of the form c29XXX, where XXX is a 3-digit FIPS county code.),
keyvars=variable,
keyidvars=Item_description,
SubType=1com,
SetGroup=mo,
URLmeta=%str(),
VarSet=,
debug=0);
%doset(libname=popests,memname=mocom&gyr.t,template=_template_mocomt)
/* Comment out =============================================================
%doset(mode=,libname=popests,
memname=_template_uscom,
memlabel=%nrbquote(County estimates with components of change for 2000 thru ~Gyear, entire US),
geouniv=UnitedStates,
units=state county,
Years=%str(2000-~Gyear),
CreatePgm=uscomYY.cnvt,
Keywords=Population estimates county components of change migration births deaths time series post 2000,
Description=%nrbquote(Estimates of the total pop of counties, states and the US for July 1 of each year from
2000 to ~Gyear. along with annual birth, death, international and domestic migration estimates (the components of change).),
keyvars=SumLev state county msacmsa cbsa,
keyfmats=SumLev state county metro cbsa,
DataSource=%str(U.S. Bureau of the Census: FSCPE. Estimates released in spring, ~yearp1),
SortedBy=State County,
UsageNotes=%nrbquote(
- Variables that do not have a time indicator are for July 1, ~Gyear or for the
period 4-1-2000 to 7-1-~Gyear. So Popest is the latest estimate and Births is the estimated total births over the
period.
- Most variables have a base name and a time indictor suffix. The base names are Pop (total pop), PopC (population change),
BRTH , DTH (birth and death) , IMIG, DMIG, TMIG (intermational, domestic and total net
migration) and RSDL (residual migration). The time indicator suffix can be JLyy, where yy is a 2-digit year (the
1st 2 digits of the year are assumed to be 20), a single year span such as 0102 (the 1 year period from 7-1-2001 thru
7-1-2002) or AJ00, indicating the quarterly period April thru June, 2000.
- The 2 variables with 1yr suffixes represent the change and pct change in the pop estimate over the most recent
1-year period.
- The rank variables are assigned based on the values of key variables, with lowest rank corresponding to highest values.
Thus if rankch1y=1 for a county it means that PopCh1yr for that county was the highest in the nation. If
rankpop=7 for a state it indicates that state had the 7th highest population estimate in the current year (~Gyear).),
SubType=1com,
SetGroup=us,
URLmeta=%str(https://mcdc.missouri.edu/pub/data/popests/uscom~gyr..Metadata.html),
VarSet=,
debug=0);
%doset(mode=,libname=popests,
memname=_template_mocom,
memlabel=%nrbquote(County estimates with components of change for 2000 thru ~Gyear, Missouri only),
geouniv=Missouri,
units=state county,
Years=%str(2000-~Gyear),
CreatePgm=uscomYY.cnvt,
Keywords=Population estimates county components of change migration births deaths time series post 2000 Missouri,
Description=%nrbquote(Estimates of the total pop of Missouri counties and the state for July 1 of each year from
2000 to ~Gyear. along with annual birth, death, international and domestic migration estimates (the components of change).),
keyvars=SumLev state county msacmsa cbsa,
keyfmats=SumLev state county metro cbsa,
DataSource=%str(U.S. Bureau of the Census: FSCPE. Estimates released circa April, ~yearp1),
SortedBy=County,
UsageNotes=%nrbquote(
- This dataset (view) is just a geographic subset of the uscom dataset for the same year.
- Variables that do not have a time indicator are for July 1, ~Gyear or for the
period 4-1-2000 to 7-1-~Gyear. So Popest is the latest estimate and Births is the estimated total births over the
period.
- Most variables have a base name and a time indictor suffix. The base names are Pop (total pop), PopC (population change),
U65P, O65P (Under and Over 65 pop), BRTH , DTH (birth and death) , IMIG, DMIG, TMIG (intermational, domestic and total net
migration) and RSDL (residual migration). The time indicator suffix can be JLyy, where yy is a 2-digit year (the
1st 2 digits of the year are assumed to be 20), a single year span such as 0102 (the 1 year period from 7-1-2001 thru
7-1-2002) or AJ00, indicating the quarterly period April thru June, 2000.
- The 2 variables with 1yr suffixes represent the change and pct change in the pop estimate over the most recent
1-year period.
- The rank variables are assigned based on the values of key variables for all states or counties in the U.S.
, with lowest rank corresponding to highest values.),
SubType=1com,
SetGroup=mo,
URLmeta=%str(https://mcdc.missouri.edu/pub/data/popests/uscom~gyr..Metadata.html),
VarSet=,
debug=0);
%doset(mode=,libname=popests,
memname=_template_ussc,
memlabel=%nrbquote(Subcounty estimates for 2000 thru ~Gyear, entire US),
geouniv=UnitedStates,
units=place county mcd,
Years=%str(2000-~Gyear),
CreatePgm=ussccnvt~gyr,
Keywords=Population estimates subcounty place mcd time series post 2000,
Description=%nrbquote(Estimates of the total pop of places (cities) and other sub-county geographic areas.
The 2k census count and an adjusted estimate base figure are provided along with July 1 estimates for each year starting
with 2000 and ending with ~Gyear.),
keyvars=SumLev state county placefp ,
keyfmats=SumLev state county fplace,
keyquals=| | | state ,
DataSource=%str(U.S. Bureau of the Census: FSCPE. Estimates released circa ~scmonth, ~yearp1),
SortedBy=State,
UsageNotes=%nrbquote(
- While referred to as the "subcounty" estimates, this dataset also contains summaries for
counties and states. In addition to summaries
for complete places and MCDs, it contains summaries for these areas within county.
- The popestBase figure may differ from the pop00c published Census count for various reasons, including CQR adjustment or
because of post-census annexation or deannexation. PopChang and PctChang are based on using popestBase and will thus not
reflect growth or shrinkage based on expanding or contracting a jurisdictions boundaries.
- The place level data does not include CDPs (Census Designated Places).
- The pseudo-code 99990 for placefp (FIPS place code) indicates a summary for the unincorporated remainder of a county.
),
SubType=2sc,
SetGroup=us,
VarSet=,
URLMeta=,
debug=1);
%doset(mode=,libname=popests,
memname=_template_mosc,
memlabel=%nrbquote(Subcounty estimates for 2000 thru ~Gyear, Missouri only),
geouniv=Missouri,
units=place county mcd,
Year=%str(2000-~Gyear),
CreatePgm=ussccnvt~gyr,
Keywords=Population estimates subcounty place mcd time series post 2000 Missouri,
Description=%nrbquote(Estimates of the total pop of places (cities) and Minor Civil Divisions
in 22 Missouri counties where the county subdivsions are also governmental units.
The 2k census count and an adjusted estimate base figure are provided along with July 1 estimates for each year starting
with 2000 and ending with ~Gyear.),
keyvars=SumLev state county placefp ,
keyfmats=SumLev state county fplace,
keyquals=| | | state ,
DataSource=%str(U.S. Bureau of the Census: FSCPE. Estimates released circa ~scmonth, ~yearp1),
UsageNotes=%nrbquote(- In addition to summaries
for complete places, this dataset also contains summaries for places within county and (in those counties
that have Minor Civil Divisions) within MCD.
- Starting with the data released for 2005 the MCDC has adjusted these estimates for places to reflect
successful challenges to the Census Bureau estimate for the latest year. This effects the city of St. Louis.
- Only 22 counties in Missouri have MCDs (County subdivisions that are functioning governmental units). They are:
Barton Bates Caldwell Carroll Chariton Dade Daviess DeKalb Dunklin Gentry Grundy
Harrison Henry Linn Livingston Mercer Nodaway Putnam Stoddard Sullivan Texas and Vernon.
- The popestBase figure may differ from the published Census count (pop00c) for various reasons, including CQR adjustment or
because of post-census annexation or deannexation. PopChang and PctChang are based on using popestBase and will thus not
reflect growth or shrinkage based on expanding or contracting a jurisdictions boundaries.
- The place level data does not include CDPs (Census Designated Places).
- The pseuo-code 99990 for placefp indicates a summary for the unincoporated remainder of a county.
),
SubType=2sc,
SetGroup=mo,
VarSet=,
URLMeta=,
debug=0);
%doset(mode=,libname=popests,
memname=_template_challenges,
memlabel=%nrbquote(Sucessful populations estimate challenges for ~gyear),
geouniv=United States,
units=place county mcd,
Year=~Gyear,
CreatePgm=estimate_challenges,
Keywords=Population estimates challenges subcounty place mcd,
Description=%nrbquote(Documents successful challenges by jurisdictions nationwide for vintage ~Gyear pop estimates),
keyvars=SumLev state,
keyfmats=SumLev state,
DataSource=%str(U.S. Bureau of the Census: Challenges web page),
UsageNotes=%nrbquote(- We took the data posted at http://www.census.gov/popest/archives/2000s/vintage_~gyear/~gyr.s_challenges.html
which we copied and pasted into a text file. We read in that file to get the challenge data (area name, original and revised estimates, and
the date the challenge was accepted). Then we merged that data with the following year's estimates and all the other variables, such as most of the
geographic codes and the two PopJLxx items came from that.
- Adjustment variable is derived as Revised_estimate - Original_estimate. Almost always a positive number.
- EstPotentialRevised is derived by adding the Adjustment to the latest year (~yearp1) figure. The logic is that if they got the Bureau to
accept 5000 more people last year there is a possibility that they will do the same thing this year. Just a crude, unofficial guesstimate.
),
SubType=3sc,
SetGroup=us,
VarSet=,
URLMeta=%str(http://www.census.gov/popest/archives/challenges.html),
debug=0);
***********************DO NOT USE CODE RELATED TO CASRH Datasets here: we have created a separate module for
updating these: invoke_dosets_casrh **********************************;
%doset(mode=,libname=popests,
memname=_template_casrh,
memlabel=%nrbquote(~stab county estimates by age, sex, race, hisp:2000-~Gyear),
geouniv=~gstatenm,
units=county_asrht_demographic_combos,
Years=%str(2000-~Gyear),
CreatePgm=casrh_cnvt20yya,
Keywords=Population estimates county age sex race hispanic origin,
Description=%nrbquote(Estimates of the population of ~statenm counties for July 1 of each year from
2000 to ~Gyear broken down by detailed age, sex, race, and hispanic origin.),
keyvars=sumtype county cbsa age sex race hispanic,
keyfmats=sumtype county cbsa age sex race hispani,
DataSource=%str(U.S. Bureau of the Census: FSCPE. Estimates released summer, ~yearp1),
SortedBy=County,
UsageNotes=%nrbquote(- Each row/obs in this dataset contains a time series of estimates for a
specific combination of 4 demographic dimensions for a county.
The demographic keys are age, sex, race and hispanic. When the value of one or more of these is blank it
means the summary does not involve that category. The SumType variable contains a string of up to 4 letters indicating what
dimensions pertain. A value of 'ash', for example, indicates a summary by age, sex and hispanic origin (with race not considered.)
A value of 'a' means data by age alone, with sex, race and hispanic not considered.
- A value of t for SumType indicates a total pop summary with no demographic detail.
- If you are looking for comparable state level data there is a usstatescasrh~gyr dataset in this (popests) data directory.
- Total pop and 1-dimensional summaries for all US counties are in the us1dimsums_casrh~gyr dataset.
- The key to understanding the codes is in the SAS value-labels code.
Download this file to use as your codebook.
- The most recent metropolitan/micropolitan statistical area codes have been added to the observations in
the variables CBSA and cbsatype. Sophisticated users can create CBSA summaries using the aggregation options in the
Advanced Options section of Dexter.
- Note that to select sumtype values that have race-alone or multi-race summaries you have to select lower-case r,
while race-alone-or-in-combination summaries are indicated by an upper-case R. When
filtering on SumType enter a tilde (~) as the first character of your value to indicate that case matters. E.g. a filter of :
SumType Equal To `ar
will select summaries by age and by the 6 race-alone categories (including the multi-race cat).
- If you would prefer to see the data in the format as originally released by the Census Bureau, you can look in the casrhalt subdirectory.
),
SubType=4casrh,
SetGroup=~stab,
VarSet=,
URLMeta=%str(https://mcdc.missouri.edu/cgi-bin/browse?/pub/data/popests/Tools/casrh_formats.sas@),
debug=0);
*----------------------------------------Non-template members start here----------------------------------------------------*;
%doset(libname=popests,memname=moprojnchsbridged_sumry,
memlabel=%str(Mo projected pops thru 2020 by county, age, sex, race, hispanic),
geouniv=Missouri,units=state county,
years=2005 2010 2015 2020,
createpgm=nchsbridged_projections_sumry,
description=%nrbquote(Based on preliminary and very unofficial OSEDA projections which in turn were based on
"bridged race" estimates for the 1990s and early 2000s. This is a summary of the rawer near-microdata projection
datasets moprojnchsbridged2005 thru moprojnchsbridged2020 in this same data directory.),
DataSource=%str(Census Bureau/NCHS. Projection algorithm, programming by OSEDA.),
SortedBy=State County Year Age,
UsageNotes=%nrbquote(- Estimates are by single year of age but with summaries across all ages indicated by a
blank value for variable Age.
- Use these projections at your own risk. They were not produced by a professional demographer.
- All age-related variables are 2-char with leading 0s required. Age=00 means a summary for infants under 1 year.
Age_cohort1=00 indicates an Age value between 00 and 17. Age_cohort2=00 means an Age value between 00 and 04.
- Use the
two Age_cohort identifiers as aggby variables in Section V. to get summaries by these age groupings.
- To get a name instead of FIPS code for County on output files enter the following in the Format box in Section V-c:
county $mocnty.
),
SortPrio=9,
SubType=9ps,
SetGroup=mo,
keyvars=Sumlev County Age Age_Cohort1 Age_cohort2,
keyfmats=sumlev mocnty,
debug=0);
*-----------------Here are the entries for the state estimates by single years of age, sex, race (2 kinds) and hispanic--;
%let Gyear=2002; %let yearp1= %eval(&Gyear + 1); %let Gyr=%substr(&Gyear,3,2);
%doset(mode=,libname=popests,
memname=usstateasrh5_&Gyr,
geouniv=UnitedStates,
units=state,
Years=%str(2000-~Gyear),
CreatePgm=stateasrh_cnvt20yy,
Keywords=Population estimates state single years of age sex race hispanic origin,
Description=%nrbquote(Estimates of the population of all US states for July 1 of each year from
2000 to ~Gyear broken down by detailed (single years thru 84) age, sex, race (alone or in combination categories), hispanic origin.),
keyvars=state age sex race hispanic,
keyfmats=state | | | |,
DataSource=%str(U.S. Bureau of the Census: FSCPE. Estimates released summer, ~yearp1),
SortedBy=State,
UsageNotes=%nrbquote(- Each row/obs in this dataset represents a 4-dimensional category of population
within a county. The demographic keys are age, sex, race and hispanic. Age values range from 0 to 85, where 0 means under 1 yr
old, 1 thru 84 means that many yrs old and 85 means 85 or over.
Race values are 1 white, 2 black, 3 Am Indian, 4 Asian and 5 Hawn and PI, all
alone or combination cats. Sex is 1 Male, 2 Female, and Hispanic is 1 Non-hispanic and 2 Hispanic.
- There are no subtotal entries in these files where one or more of the demographic keys are blank as with the corresponding
county level datasets.
- These data will not sum to correct totals because the race categories overlap and you get double-counting. Use
the companion dataset, usstateasrh6_&Gyr, for doing aggregation.
- See the view mostatesasrh6_&Gyr for a Missouri-only subset.
),
SubType=5other,
SetGroup=us,
VarSet=,
URLMeta=%str(http://eire.census.gov/popest/data/states/stasro.php),
debug=0);
%doset(mode=,libname=popests,
memname=usstateasrh6_&Gyr,
geouniv=UnitedStates,
units=state,
Years=%str(2000-~Gyear),
CreatePgm=stateasrh_cnvt20yy,
Keywords=Population estimates state single years of age sex race hispanic origin,
Description=%nrbquote(Estimates of the population of all US states for July 1 of each year from
2000 to ~Gyear broken down by detailed (single years thru 84) age, sex, 5 race-alone + 1 multi-race category, hispanic origin.),
keyvars=state age sex race hispanic,
keyfmats=state | | | |,
DataSource=%str(U.S. Bureau of the Census: FSCPE. Estimates released summer, ~yearp1),
SortedBy=State,
UsageNotes=%nrbquote(- Each row/obs in this dataset represents a 4-dimensional category of population
within a county. The demographic keys are age, sex, race and hispanic. Age values range from 0 to 85, where 0 means under 1 yr
old, ...84 means 84 yrs old and 85 means 85 or over. Race values are 1 white, 2 black, 3 Am Indian, 4 Asian and 5 Hawn and PI, all
alone or combination cats. Sex is 1 Male, 2 Female, and Hispanic is 1 Non-hispanic and 2 Hispanic.
- the 6 in the set name refers to the 6 Race categories as opposed to the 5 alone-or-in-combination race cats in the
compaion usstatesrh5_&Gyr set,
- There are no subtotal entries in these files where one or more of the demographic keys are blank as with the corresponding
county level datasets.
- See the view mostatesasrh5_&Gyr for a Missouri-only subset.
),
SubType=5other,
SetGroup=us,
VarSet=,
URLMeta=%str(http://eire.census.gov/popest/data/states/stasro.php),
debug=0);
%doset(mode=,libname=popests,
memname=mo9099_intercensaladj,
geouniv=Missouri,
units=state county,
Years=%str(1990-2000),
CreatePgm=mo9099_intercensaladj,
Keywords=Population estimates Missouri counties adjusted intercensal 1990s,
Description=
%nrbquote(Time Series of Missouri Intercensal Population Estimates by County: April 1, 1990 to April 1, 2000 (ADJUSTED)),
keyvars=sumlev county,
keyfmats=sumlev county,
DataSource=%str(U.S. Bureau of the Census),
SortedBy=County,
UsageNotes=%nrbquote(
- These estimates have been developed by applying a mathematical formula to take into account differences between the postcensal time
series population estimates for the 1990s and Census 2000 results.
- Data downloaded from Bureau web
page.
- First observation on the dataset is the state summary with county code of 29000.
- This dataset can be combined with the latest mocomYY dataset to get population trends spanning the two decades.
),
SubType=6intercensal,
SetGroup=mo,
VarSet=,
URLMeta=%str(http://eire.census.gov/popest/data/counties/tables/CO-EST2001-12/CO-EST2001-12-29.php),
debug=0);
%doset(mode=,libname=popests,
memname=usstates_as2003,
geouniv=UnitedStates,
units=us state,
Years=2003,
CreatePgm=states_as2003,
Keywords=Population estimates state age sex 2003,
Description=%nrbquote(Estimates of the population of all US states for July 1, 2003 by broad age categories and
sex.),
keyvars=sumlev state,
keyfmats=sumlev state,
DataSource=%str(U.S. Bureau of the Census: FSCPE. Estimates released March, 2004),
SortedBy=State,
UsageNotes=%nrbquote(- This is a stopgap release that will be obsolete when the complete estimates for detailed
age, race, sex and Hispanic origin are released later in 2004.
),
SubType=5other,
SetGroup=us,
VarSet=,
URLMeta=%str(http://eire.census.gov/popest/data/states/stasro.php),
debug=0);
%macro special;
*==================Special step to modify the datasets dataset so that non-current estimates are pointed to
within the archives subdirectory ======================================================================;
proc sort data=popests.datasets force; by memname; run ;
data _updates;
set popests.datasets(keep=memname subtype subdir years);
where subtype in ('com','casrh','sc');
length _year $4;
_year=scan(years,-1,'-');
if subtype='com' and _year <= '2004' then subdir='archives';
else
if subtype='sc' and _year <= '2003' then subdir='archives';
else if subtype='casrh' and _year le '2004' then subdir='archives';
drop _year;
if subdir ne ' ' then do;
libname=subdir;
libpath='/pub/data/archives/popests';
output;
end;
run ;
data popests.datasets;
update popests.datasets _updates;
by memname;
run ;
%mend special;
*-----------------------invoke the special macro here if needed<==========================================;
%**special ;
%doset(mode=,libname=popests,
memname=usstates_agesex_civ2004,
memlabel=%nrbquote(State and US estimates of Civilian pop by single yrs of age and sex, 200-2004),
geouniv=UnitedStates,
units=state us,
Years=%str(2000-2004),
CreatePgm=states_agesex_civ2004,
Keywords=Population estimates age sex states time series post 2000,
Description=%nrbquote(Estimates of the civilian pop of the US, states and PR. This is a "cell"
dataset, rather than the usual geographic summary set. Each observation represents a time series of
estimates for a single year of age, a specified sex category and a specific geographic area.),
keyvars=SumLev state sex age,
keyfmats=SumLev state,
DataSource=%str(U.S. Bureau of the Census: FSCPE. Estimates released circa March, 2005),
SortedBy=State sex age,
UsageNotes=%nrbquote(- Note that these numbers are for the civilian (non-military)
population only.
- The values for the variable Sex are 0, 1 and 2. O means it is a summary
across both sexes, 1 means Male and 2 means Female.
- Age has value from 0 to 85. 0 means persons under 1 year of age, 85 means persons aged 85 and over.
Unlike with the Sex identifier there is no value for Age that means "total over all ages".
),
SubType=5other,
SetGroup=us,
VarSet=,
URLMeta=%str(http://www.census.gov/popest/states/files/SC_EST2004_AGESEX_CIV.txt),
debug=0);
*----------------components of change sets-------------------------------;
%let gyear=2005; %let gyr=05;
%doset(libname=popests,memname=uscomcbsas05,template=_template_uscom,
memlabel=%nrbquote(Metro and Micropolitan area estimates with components of change for 2000 thru &gyear),
units=%str(US cbsa cbsa/state), years=%str(2000-2005),
createpgm=aggpopests_uscbsas,
description=(Summaries of the data in uscom05 at the nation and CBSA (complete and within-state) levels. This is
pop estimates for 2005 with components of change since 2000),
DataSource=%str(Raw data from the Census/FSCPE but aggregated by the Missouri Census Data Center),
Sortedby=cbsa,
UsageNotes=%nrbquote(- This is just like uscom05 in terms of variables but the geography is different.
- We created AreaName as the CBSA name for SumLev 310 (complete CBSA) and we appended "XX part" where XX is a state postal
abbev for the SumLev 311 CBSA-within-state summaries. Occasionally truncated if name is longer than 64.
- ncos variable contains the count of counties we aggregated to get the summary.
- PartCBSA is a flag only defined for SumLev 311. A value of 'y' means that this state portion is only part of the complete
multi-state CBSA. A value of 'n' means it is not a part - the CBSA is entirely within 1 state.
- The States variable (note that plural) is a list of state FIPS codes indicating what state(s) the CBSA is contained in.
It is only defined on complete-CBSA (SumLev 310) summaries.
- There is a pdf report module based on this dataset in the popests/Reports directory.
),
keyvars=SumLev cbsa state cbsatype,
keyfmats=sumlev cbsa state ,
debug=0);
%let gyear=2007; %let gyr=07; %let yearp1=2008;
%let gyear=2008; %let gyr=08; %let yearp1=2009;
%let gyear=2009; %let gyr=09; %let yearp1=2010;
%doset(libname=popests,memname=uscomcbsas&gyr,template=_template_uscom, fixindex=1,
memlabel=%nrbquote(Metro and Micropolitan area estimates with components of change for 2000 thru &gyear),
units=%str(US cbsa cbsa/state), years=%str(2000-&gyear),
createpgm=aggpopests_uscbsas,
description=(Summaries of the data in uscom06 at the nation and CBSA (complete and within-state) levels. This is
pop estimates for &gyear with components of change since 2000),
DataSource=%str(Raw data from the Census/FSCPE but aggregated by the Missouri Census Data Center),
Sortedby=cbsa,
UsageNotes=%nrbquote(- This is just like uscom&gyr in terms of variables but the geography is different.
- We created AreaName as the CBSA name for SumLev 310 (complete CBSA) and we appended "XX part" where XX is a state postal
abbev for the SumLev 311 CBSA-within-state summaries. Occasionally truncated if name is longer than 64.
- ncos variable contains the count of counties we aggregated to get the summary.
- PartCBSA is a flag only defined for SumLev 311. A value of 'y' means that this state portion is only part of the complete
multi-state CBSA. A value of 'n' means it is not a part - the CBSA is entirely within 1 state.
- The States variable (note that plural) is a list of state FIPS codes indicating what state(s) the CBSA is contained in.
It is only defined on complete-CBSA (SumLev 310) summaries.
- There is a pdf report module based on this dataset in the popests/Reports directory.
),
keyvars=SumLev cbsa state cbsatype,
keyfmats=sumlev cbsa state ,
debug=0);
%doset(libname=popests,memname=uscom&gyr,template=_template_uscom)
%doset(libname=popests,memname=mocom&gyr,template=_template_mocom,
UsageNotes=%nrbquote(- This dataset is a geographic subset of the uscom dataset for the same year
with a series of additonal county-based region geocodes added, such as rpc, dot, etc (see Key variables).
- The mocomregns&gyr dataset contains summaries for the various county-based regions and was created by aggregating the
data in this dataset.
- RPC codes reflect the change in &gyear involving Pulaski county.
- Variables that do not have a time indicator suffix are for July 1, &Gyear or for the
period 4-1-2000 to 7-1-&Gyear.. So Popest is the latest estimate and Births is the estimated total births over the
period.
- Most variables have a base name and a time indicator suffix. The base names are Pop (total pop), PopC (population change),
GQPop (group quarters pop), BRTH , DTH (birth and death) , IMIG, DMIG, TMIG (intermational, domestic and total net
migration) and RSDL (residual migration). The time indicator suffix can be JLyy, where yy is a 2-digit year (the
1st 2 digits of the year are assumed to be 20), a single year span such as 0102 (the 1 year period from 7-1-2001 thru
7-1-2002) or AJ00, indicating the quarterly period April thru June, 2000.
- The Under and Over 65 estimates that were once reported in this series are not on this dataset.
- The 2 variables with 1yr suffixes represent the change and pct change in the pop estimate over the most recent
1-year period.
),
keyvars=SumLev state county msacmsa cbsa dot ded_region rpc UMX2 aaa ui_code cbsatype,
keyfmats=SumLev state county metro cbsa modot dedrgn rpcname umxname aaa ui_code |,
CreatePgm=uscomYY.cnvt,
URLMeta=%str(none),
debug=0
) ;
%doset(libname=popests,memname=mocomregns&gyr.,template=_template_mocom,
memlabel=%str(Missouri County-based region summaries of data in mocom&gyr),
units=CBSA RPC DED UMX DOT AAA etc,
UsageNotes=%nrbquote(- This dataset contains summaries of a number of different region types for the state of
Missouri. It was derived by aggregating the county level data in mocom&gyr
(see Key variables).
- The mocom&gyr dataset contains the county level detail for the same variables.
- RPC codes reflect the change in 2005 involving Pulaski county.
- Variables that do not have a time indicator suffix are for July 1, &Gyear or for the
period 4-1-2000 to 7-1-&Gyear.. So Popest is the latest estimate and Births is the estimated total births over the
period.
- Most variables have a base name and a time indicator suffix. The base names are Pop (total pop), PopC (population change),
GQPop (group quarters pop), BRTH , DTH (birth and death) , IMIG, DMIG, TMIG (intermational, domestic and total net
migration) and RSDL (residual migration). The time indicator suffix can be JLyy, where yy is a 2-digit year (the
1st 2 digits of the year are assumed to be 20), a single year span such as 0102 (the 1 year period from 7-1-2001 thru
7-1-2002) or AJ00, indicating the quarterly period April thru June, 2000.
- The Under and Over 65 estimates that were once reported in this series are not on this dataset.
- The 2 variables with 1yr suffixes represent the change and pct change in the pop estimate over the most recent
1-year period.
),
keyvars=SumLev cbsa dot ded_region rpc UMX2 aaa ui_code cbsatype,
keyfmats=SumLev cbsa modot dedrgn rpcname umxname aaa ui_code |,
CreatePgm=aggpopests_moregns,
URLMeta=%str(none),
debug=0
) ;
%let gyear=2005; %let gyr=%substr(&gyear,3,2);
%doset(libname=popests,memname=mocomregns&gyr,template=_template_mocom,
memlabel=%str(Missouri County-based region summaries of data in mocom&gyr),
units=CBSA RPC DED UMX DOT AAA etc,
UsageNotes=%nrbquote(- This dataset contains summaries of a number of different region types for the state of
Missouri. It was derived by aggregating the county level data in mocom&gyr
(see Key variables).
- The mocom&gyr dataset contains the county level detail for the same variables.
- RPC codes reflect the change in 2005 involving Pulaski county.
- Variables that do not have a time indicator suffix are for July 1, &Gyear or for the
period 4-1-2000 to 7-1-&Gyear.. So Popest is the latest estimate and Births is the estimated total births over the
period.
- Most variables have a base name and a time indicator suffix. The base names are Pop (total pop), PopC (population change),
GQPop (group quarters pop), BRTH , DTH (birth and death) , IMIG, DMIG, TMIG (intermational, domestic and total net
migration) and RSDL (residual migration). The time indicator suffix can be JLyy, where yy is a 2-digit year (the
1st 2 digits of the year are assumed to be 20), a single year span such as 0102 (the 1 year period from 7-1-2001 thru
7-1-2002) or AJ00, indicating the quarterly period April thru June, 2000.
- The Under and Over 65 estimates that were once reported in this series are not on this dataset.
- The 2 variables with 1yr suffixes represent the change and pct change in the pop estimate over the most recent
1-year period.
),
keyvars=SumLev cbsa dot ded_region rpc UMX2 aaa ui_code cbsatype,
keyfmats=SumLev cbsa modot dedrgn rpcname umxname aaa ui_code |,
CreatePgm=aggpopests_moregns,
URLMeta=%str(none),
debug=0
) ;
%doset(libname=popests,memname=uscom05,template=_template_uscom)
%doset(libname=popests,memname=mocom05,template=_template_mocom,
UsageNotes=%nrbquote(- This dataset is a geographic subset of the uscom dataset for the same year
with a series of additonal county-based region geocodes added, such as rpc, dot, etc (see Key variables).
- The mocomregns&gyr dataset contains summaries for the various county-based regions and was created by aggregating the
data in this dataset.
- RPC codes reflect the change in 2005 involving Pulaski county.
- Variables that do not have a time indicator suffix are for July 1, &Gyear or for the
period 4-1-2000 to 7-1-&Gyear.. So Popest is the latest estimate and Births is the estimated total births over the
period.
- Most variables have a base name and a time indicator suffix. The base names are Pop (total pop), PopC (population change),
GQPop (group quarters pop), BRTH , DTH (birth and death) , IMIG, DMIG, TMIG (intermational, domestic and total net
migration) and RSDL (residual migration). The time indicator suffix can be JLyy, where yy is a 2-digit year (the
1st 2 digits of the year are assumed to be 20), a single year span such as 0102 (the 1 year period from 7-1-2001 thru
7-1-2002) or AJ00, indicating the quarterly period April thru June, 2000.
- The Under and Over 65 estimates that were once reported in this series are not on this dataset.
- The 2 variables with 1yr suffixes represent the change and pct change in the pop estimate over the most recent
1-year period.
),
keyvars=SumLev state county msacmsa cbsa dot ded_region rpc UMX2 aaa ui_code cbsatype,
keyfmats=SumLev state county metro cbsa modot dedrgn rpcname umxname aaa ui_code |,
CreatePgm=uscomYY.cnvt,
URLMeta=%str(none),
debug=0
) ;
%doset(libname=popests,memname=mocom06t,template=_template_mocomt)
%let scmonth=July;
%let Gyear=2004; %let yearp1= %eval(&Gyear + 1); %let gyr=%substr(&gyear,3,2);
%doset(libname=popests,memname=ussc04,template=_template_ussc)
%doset(libname=popests,memname=mosc04,template=_template_mosc);
%let scmonth=June;
%let Gyear=2005; %let yearp1= %eval(&Gyear + 1); %let gyr=%substr(&gyear,3,2);
%doset(libname=popests,memname=ussc05,template=_template_ussc)
%doset(libname=popests,memname=mosc05,template=_template_mosc);
%let scmonth=June;
%let Gyear=2006; %let yearp1= %eval(&Gyear + 1); %let gyr=%substr(&gyear,3,2);
%doset(libname=popests,memname=ussc06,template=_template_ussc)
%doset(libname=popests,memname=mosc06,template=_template_mosc);
%let scmonth=July;
%let Gyear=2007; %let yearp1= %eval(&Gyear + 1); %let gyr=%substr(&gyear,3,2);
%doset(libname=popests,memname=ussc07,template=_template_ussc)
%doset(libname=popests,memname=mosc07,template=_template_mosc);
%let Gyear=2008;
%let yearp1= %eval(&Gyear + 1); %let gyr=%substr(&gyear,3,2);
%let yearm1= %eval(&Gyear - 1);
%doset(libname=popests,memname=ussc08,template=_template_ussc)
%doset(libname=popests,memname=mosc08,template=_template_mosc);
%let Gyear=2009;
%let yearp1= %eval(&Gyear + 1); %let gyr=%substr(&gyear,3,2);
%let yearm1= %eval(&Gyear - 1);
%doset(libname=popests,memname=ussc09,template=_template_ussc)
%doset(libname=popests,memname=mosc09,template=_template_mosc);
%let gyear=2007; %let yearp1= %eval(&Gyear + 1); %let gyr=%substr(&gyear,3,2);
%doset(libname=popests,memname=challenges2007,template=_template_challenges);
*--------------casrh (county, age sex race hispanic) estimates-----;
%***let todo=; %*---turn off the list of datasets "to do" so that doset will actually do something with
the casrh datasets.---------;
*---here we add the casrh05 datasets-------------;
%let Gyear=2005; %let yearp1= %eval(&Gyear + 1); %let gyr=%substr(&gyear,3,2);
%macro doit(state,stab);
%let gstate=&state; %let gstab=&stab; %let gstatenm=&statenm;
%doset(libname=popests,memname=&stab.casrh&gyr,template=_template_casrh)
%mend doit;
%**dostates(n=51,names=1);
%let stab=us; %let statenm=UnitedStates;
options mprint;
%doset(libname=popests, memname=usstatescasrh&gyr,template=_template_casrh,
memlabel=%str(US state level estimates by age, sex, race, hispanic: 2000-&gyear),
geouniv=UnitedStates,
description=%nrbquote
(Estimates of the population of U.S. states for July 1 of each year from 2000 to &gyear
broken down by detailed age, sex, race, and hispanic origin.),
keyvars=sumtype state age sex race hispanic,
keyfmats=sumtype state age sex race hispani,
units=State_asrht_combos,
UsageNotes=%nrbquote(- Each row/obs in this dataset contains a time series of estimates for a
specific combination of 4 demographic dimensions for a state. This is just like the set of county level estimates, 1 per
state, but here we have just 1 dataset for the country, with state summaries. There are no national totals here.
- The demographic keys are age, sex, race and hispanic. When the value of one or more of these is blank it
means the summary does not involve that category. The SumType variable contains a string of up to 4 letters indicating what
dimensions pertain. A value of 'ash', for example, indicates a summary by age, sex and hispanic origin (with race not considered.)
A value of 'a' means data by age alone, with sex, race and hispanic not considered.
- A value of t for SumType indicates a total pop summary with no demographic detail.
- If you are looking for comparable state level data there is a usstatescasrh~gyr dataset in this (popests) data directory.
- Total pop and 1-dimensional summaries for all US counties are in the us1dimsums_casrh~gyr dataset.
- The key to understanding the codes is in the SAS value-labels code.
Download this file to use as your codebook.
- The most recent metropolitan/micropolitan statistical area codes have been added to the observations in
the variables CBSA and cbsatype. Sophisticated users can create CBSA summaries using the aggregation options in the
Advanced Options section of Dexter.
- Note that to select sumtype values that have race-alone or multi-race summaries you have to select lower-case r,
while race-alone-or-in-combination summaries are indicated by an upper-case R. When
filtering on SumType enter a tilde (~) as the first character of your value to indicate that case matters. E.g. a filter of :
SumType Equal To `ar
will select summaries by age and by the 6 race-alone categories (including the multi-race cat).
- If you would prefer to see the data in the format as originally released by the Census Bureau, you can look in the casrhalt subdirectory.
),
debug=0) ;
options NOmprint; *<=============================;
%doset(libname=popests, memname=us1dimsums_casrh&gyr,template=_template_casrh,
geouniv=UnitedStates,
description=%nrbquote(County level summaries for entire US for total pop and single dimensions),
units=Counties_asrht1_combos,
keyvars=sumlev sumtype state county cbsa age sex race hispanic,
keyfmats=sumlev sumtype state county cbsa age sex race hispani,
UsageNotes=%nrbquote(- Each row/obs in this dataset contains a time series of estimates for a
subpopulation based on a single demographic category (age, sex, race alone, race alone or in combination, hispanic)
as well as total pop (SumType=t). It was created by taking all the observations in the county level datasets by state that had
a 1-character SumType value and concatenating them in state/county order.
- A value of t for SumType indicates a total pop summary with no demographic detail.
- If you are looking for state level summaries there is a usstatescasrh~gyr dataset.
- The most recent metropolitan/micropolitan statistical area codes have been added to the observations in
the variables CBSA and cbsatype.
- Note that to select sumtype values that have race-alone summaries you have to select lower-case r, while race-alone-or-in-combination summaries are indicated by an upper-case R. When
filtering on SumType enter a tilde (`) as the first character of your value to indicate that case matters. E.g. a filter of :
SumType Equal To `r
will select summaries by
the 5 race-alone categories and the single multi-race category.
),
subtype=4casrh2,
debug=0)
%***let gyear=2007;
%let gyear=2008;
%let gyr=%substr(&gyear,3,2);
%doset(mode=,libname=popests,
memname=uscomnst&gyr,
memlabel=%nrbquote(Nation, states ests w components of change for 2000-&gyear),
geouniv=UnitedStates,
units=state us,
Years=%str(2000-&gyear),
CreatePgm=uscomYYnst.cnvt,
Keywords=Population estimates state components of change migration births deaths time series post 2000,
Description=%nrbquote(Estimates of the total pop of states and the nation for July 1 of each year from
2000 to &gyear, along with annual birth, death, international and domestic migration estimates (the components of change).),
keyvars=SumLev state,
keyfmats=SumLev state,
DataSource=%str(U.S. Bureau of the Census: FSCPE. Estimates released circa December, &gyear),
SortedBy=State,
UsageNotes=%nrbquote(- Variables that do not have a time indicator are for July 1, &gyear or for the
period 4-1-2000 to 7-1-&gyear.. So Popest is the latest estimate and Births is the estimated total births over the
period.
- Most variables have a base name and a time indictor suffix. The base names are Pop (total pop), PopC (population change),
U65P, O65P (Under and Over 65 pop), BRTH , DTH (birth and death) , IMIG, DMIG, TMIG (intermational, domestic and total net
migration) and RSDL (residual migration). The time indicator suffix can be JLyy, where yy is a 2-digit year (the
1st 2 digits of the year are assumed to be 20), a single year span such as 0102 (the 1 year period from 7-1-2001 thru
7-1-2002) or AJ00, indicating the quarterly period April thru June, 2000.
- The 2 variables with 1yr suffixes represent the change and pct change in the pop estimate over the most recent
1-year period.
),
SubType=1com2,
SetGroup=us,
VarSet=,
URLMeta=,
debug=0);
*---Add entry for the Missouri only dataset with estimates from NCHS that are by single years of age.--;
%doset(mode=,libname=popests,
memname=monchsbridged20xx,
memlabel=%nrbquote(See popests/nchsbri for a complete 51-state collection),
geouniv=Missouri,
units=%nrbquote(county age-sex-race-hispanic combos),
Years=%str(2000-2004),
CreatePgm=cnvt_nchs_bridged,
Keywords=NCHS bridged race Population estimates county single years of age sex hispanic origin,
Description=%nrbquote(Special tab done by Census Bureau for National Center for Health Statistics. Similar to
the Bureau casrh estimates in that they are by county, age, sex, race and hispanic origin. What is special about these
estimates is that they are for single years of age and have only 4 race categories.),
keyvars=county age sex race hispanic,
keyfmats=county,
DataSource=%str(National Center for Health Statisitics and U.S. Bureau of the Census),
SortedBy=County,
UsageNotes=%nrbquote(- Each row/obs in this dataset contains a time series of estimates for a
specific combination of 4 demographic dimensions for a county.
The demographic keys are age (with values ranging from 00 to 85), sex, race (only 4 values - White, Black, American Indian
et al and Asian/Pacific Islander - the "bridged" categories) and hispanic.
- Users of the similar casrh estimates should note that there are no summaries at different levels as we have with the
casrh data. You cannot extract data based just on age, or just on race. You get all 4 demographic dimensions.
- Because of the enormous size and probably limited public demand for such detail we have only converted these data for
the state of Missouri. But we have the raw data to convert for other states upon request.
- Code values are:
Race: 1=white 2=black 3=American Ind etc 4=Asian PI.
Sex: 1=male 2=female
Hispanic: 1=non 2=hispanic.
Age: 00= under 1 yr 01=1 year old ... 85=85 and over
- Use Dexter aggby spec under Advanced Options to get summaries by combinations of age, race, sex and hispanic.
(Omit county from the aggby list to get state totals.)
- Visit the NCHS web site where the data
files were posted.
),
SubType=3nchsb,
SetGroup=mo,
VarSet=,
URLMeta=%str(https://mcdc.missouri.edu/pub/data/popests/nchsbri/DocumentationBridgedPostcenV2004.doc),
debug=0);
%doset(mode=,libname=popests,
memname=monchsbridged20xx_sumry,
memlabel=%nrbquote(See popests/nchsbri for a complete 51-state collection),
geouniv=Missouri,
units=%nrbquote(state/county age year, state/county year),
Years=%str(2000-2004),
CreatePgm=nchsbridged_sumry,
Keywords=NCHS bridged race Population estimates county single years of age sex hispanic origin,
Description=%nrbquote(A summary of monchasbridged20xx dataset in which we have one row per geographic area
(state or county), year and single year of age. The variables are Total, Male & Female, 4 race counts
(White, Black, etc),
4 race/non-hispanic counts (WhiteNH, BlackNH, etc), and Hispanic/NonHispanic. Rows where Age is blank are summaries for the
complete population, all others are summaries for persons whose age is specfified by the Age variable
(2-char. with leading 0s).
This is based on a special tab done by the Census Bureau for NCHS, and reworked by the MCDC to create
this alternate view of the data.),
keyvars=sumlev county age year,
keyfmats=sumlev mocnty,
DataSource=%str(National Center for Health Statisitics and U.S. Bureau of the Census),
SortedBy=County Year Age,
UsageNotes=%nrbquote(- All estimates are as of July 1 of the year specified (in variable Year). There are no
figures from the 2000 census.
- Use Dexter aggby spec under Advanced Options to get summaries for age intervals. E.g. filter on age using
Age Between 00:17
and specify County Year as your aggby variables.
- To select summaries without regard to Age use the Dexter filter
Age Equals _
(using the Dexter convention of an underscore representing a blank in the Value column of Section II.)
- Visit the NCHS web site where the data
files were posted.
),
SubType=3nchsbsumry,
SetGroup=mo,
VarSet=,
URLMeta=%str(https://mcdc.missouri.edu/pub/data/popests/nchsbri/DocumentationBridgedPostcenV2004.doc),
debug=1);
*---Add entry for the Missouri only dataset with 1990s intercensal estimates from NCHS that are by single years of age.--;
%doset(mode=,libname=popests,
memname=monchsbridged19xx,
memlabel=%nrbquote(See popests/nchsbri for a complete 51-state collection),
geouniv=Missouri,
units=%nrbquote(county age-sex-race-hispanic combos),
Years=%str(1990-1999),
CreatePgm=cnvt_nchs_bridged90s,
Keywords=NCHS bridged race Population estimates 1990s county single years of age sex hispanic origin,
Description=%nrbquote(Historical complement to the monchsbridged20xx dataset.
Special tab done by Census Bureau for National Center for Health Statistics. Similar to
the Bureau casrh estimates in that they are by county, age, sex, race and hispanic origin. What is special about these
estimates is that they are for single years of age and have only 4 race categories.),
keyvars=county age sex race hispanic,
keyfmats=county,
DataSource=%str(National Center for Health Statisitics and U.S. Bureau of the Census),
SortedBy=County,
UsageNotes=%nrbquote(- Each row/obs in this dataset contains a time series of estimates for a
specific combination of 4 demographic dimensions for a county.
The demographic keys are age (with values ranging from 00 to 85), sex, race (only 4 values - White, Black, American Indian
et al and Asian/Pacific Islander - the "bridged" categories) and hispanic.
- See dataset monchsbridged20xx for comparable data for post-2000 years.
- Users of the similar casrh estimates should note that there are no summaries at different levels as we have with the
casrh data. You cannot extract data based just on age, or just on race. You get all 4 demographic dimensions.
- Because of the enormous size and probably limited public demand for such detail we have only converted these data for
the state of Missouri. But we have the raw data to convert for other states upon request.
- Code values are:
Race: 1=white 2=black 3=American Ind etc 4=Asian PI.
Sex: 1=male 2=female
Hispanic: 1=non 2=hispanic.
Age: 00= under 1 yr 01=1 year old ... 85=85 and over
- Use Dexter aggby spec under Advanced Options to get summaries by combinations of age, race, sex and hispanic.
(Omit county from the aggby list to get state totals.)
- Visit the NCHS web site where the data
files were posted.
),
SubType=3nchsb,
SetGroup=mo,
VarSet=,
URLMeta=%str(https://mcdc.missouri.edu/pub/data/popests/nchsbri/DocumentationBridgedIntercenA1.doc),
debug=0);
%doset(mode=,libname=popests,
memname=monchsbridged19xx_sumry,
memlabel=%nrbquote(See popests/nchsbri for a complete 51-state collection),
geouniv=Missouri,
Years=%str(1990-1999),
CreatePgm=nchsbridged_sumry,
Keywords=NCHS bridged race Population estimates county single years of age sex hispanic origin,
units=%nrbquote(state/county age year, state/county year),
Description=%nrbquote(A summary of monchasbridged19xx dataset in which we have one row per geographic area
(state or county), year and single year of age. The variables are Total, Male & Female, 4 race counts
(White, Black, etc),
4 race/non-hispanic counts (WhiteNH, BlackNH, etc), and Hispanic/NonHispanic. Rows where Age is blank are summaries for the
complete population, all others are summaries for persons whose age is specfified by the Age variable
(2-char. with leading 0s).
This is based on a special tab done by the Census Bureau for NCHS, and reworked by the MCDC to create
this alternate view of the data.),
keyvars=sumlev county age year,
keyfmats=sumlev mocnty,
DataSource=%str(National Center for Health Statisitics and U.S. Bureau of the Census),
SortedBy=County Year Age,
UsageNotes=%nrbquote(- All estimates are as of July 1 of the year specified (in variable Year). There are no
figures from the 1990 census.
- Use Dexter aggby spec under Advanced Options to get summaries for age intervals. E.g. filter on age using
Age Between 00:17
and specify County Year as your aggby variables.
- To select summaries without regard to Age use the Dexter filter
Age Equals _
(using the Dexter convention of an underscore representing a blank in the Value column of Section II.)
- Visit the NCHS web site where the data
files were posted.
- See dataset monchsbridged20xx_sumry for comparable data for post-2k census.
),
SetGroup=mo,
SubType=3nchsbsumry,
VarSet=,
URLMeta=%str(https://mcdc.missouri.edu/pub/data/popests/nchsbri/DocumentationBridgedIntercenA1.doc),
debug=0);
%doset(mode=,libname=popests,
memname=moagesex05,
geouniv=Missouri,
Years=%str(2000-2005),
CreatePgm=agesex05,
Keywords=estimates age sex missouri,
units=%nrbquote(state/county time),
Description=%nrbquote(Selected age cohort estimates by sex. A summary of selected popular items
released as part of the 2005 casrh estimates.),
keyvars=sumlev county timecode,
keyfmats=sumlev mocnty esttime,
DataSource=%str(U.S. Bureau of the Census),
SortedBy=fipco timecode,
UsageNotes=%nrbquote(- The median age variables are not defined for the state summaries.
We aggregated county level data to get the state summaries. The medians are available for the state from
the Census Bureau but not in this dataset.
- We normally do not convert these kinds of specialized data summaries but we did it this year because
there was a delay in getting the full casrh data thru 2005, so these numbers were the first ones we had
from the new release of characteristics estimates.
),
SetGroup=mo,
SubType=4casrh,
VarSet=,
URLMeta=, debug=0);
%doset(mode=,libname=popests,
memname=uscom99,
geouniv=United States,
Years=%str(1990-1999),
CreatePgm=,
Keywords=populastion estimates components of change 1990s,
units=%nrbquote(State county),
Description=%nrbquote(For each state and county in the U.S. has data regarding population estimates for each year of the 90s
along with yearly components of change),
keyvars=slvl state county,
keyfmats=sumlev state county,
DataSource=%str(U.S. Bureau of the Census),
SortedBy=state county,
UsageNotes=%nrbquote(- The 1st observation contains a U.S. summary.
- These are from the originally published numbers in 2000 and have not been revised.
- The conversion module used to create this dataset was inadvertently written over.
),
SetGroup=mo,
SubType=5other,
VarSet=,
URLMeta=, debug=0);
%let gyear=2011; %let gbyear=2010;
%doset(mode=,libname=popests,
memname=ushuest&gyear,geouniv=United States,units=%str(county state nation),
Years=%str(&gbyear-&gyear),CreatePgm=huestsYY,
keywords=housing unit estimates,
Description=%nrbquote(Estimates of total housing units by county for each year since &gbyear thru &gyear &revised),
DataSource=%str(U.S. Bureau of the Census),
keyvars=sumlev state county, keyfmats=sumlev state county,
SortedBy=state county,
SetGroup=us,
SubType=5other,
VarSet=,
URLMeta=, debug=0);
%doset(mode=,libname=popests,
memname=mohuest&gyear,geouniv=Missouri,units=%str(county state),
memlabel=%nrbquote(Mo subset view of ushuest&gyear data set: HU estimates),
Years=%str(&gbyear-&gyear),CreatePgm=huestsYY,
keywords=housing unit estimates,
Description=%nrbquote(Mo subset of ushuest&gyear.: total housing units by county for each year since &gbyear thru &gyear),
DataSource=%str(U.S. Bureau of the Census),
keyvars=sumlev state county, keyfmats=sumlev state county,
SortedBy=county,
SetGroup=mo,
SubType=5other,
VarSet=,
URLMeta=, debug=0);
%doset(memname=ustrends2,
memlabel=%nrbquote(Demographic trend summaries focusing on change based on casrh),
filetype=popests,
geouniv=UnitedStates,
units=%nrbquote(state/county time period demographic),
Years=%str(1990 to 2009),
CreatePgm=poptrends_casrh,
Keywords=race Population trends age race hispanic origin,
Description=%nrbquote(Each obs summarizes a geographic area (State or county), a time period and a demographic category with
numerics indicating starting and ending values and measures of change over the period),
keyvars=sumlev state county Period Demographic PerNo,
keyfmats=sumlev state county | demog |,
keyidvars= | | | | | Period,
DataSource=%str(U.S. Bureau of the Census),
SortedBy=County demog perno,
UsageNotes=%nrbquote(- These data are very similar to the ustrends dataset in the nchsbri subdirectory. Those are
based on the nchsbri special tab data that comes out in late summer, while these are based on the casrh figures released in May.
As a result these data are a year more current for about 4 months of the year.
- PerNo is just a numeric sort key that corresponds to Period which is in the form [year1] to [year2]
- The poptrends2 web application accesses this data set to generate its reports. That is a very good way to access these data.
- The 13 demographic categories (demog values) are basic and only White/Nonhispanic crosses basic categories.
),
SubType=poptrends,
SetGroup=us,
VarSet=,
debug=0);
======================End comment================== */
/* =======================Begin comment================
*---make entries for earlier casrh datasets disappear from Datasets.html---;
data popests.datasets;
set popests.datasets;
if index(memname,'casrh03') or index(memname,'casrh02') then sortprio='X';
if memname='moilkscasrh04' then delete;
if index(memname,'casrh_alt04') then delete;
if substr(memname,Length(memname)-1,2) in ('02','03') and not( sortprio in(' ','X')) then sortprio='8';
if memtype=' ' then if sortprio='X' then sortprio=' ';
***if sortprio='X' then delete;
run ;
======================End comment================== */
*---Special step to fix the datasets dataset which got screwed up during run of 3-10-15 with sortprio='X' on
all data sets ---;
**proc datasets nolist library=popests; **change datasets=datasets_bkup; quit;
data popests.datasets;
set popests.datasets_bkup;
if nvars and sortprio='X' then do;
*--nvars > 0 means the data set is still there (in the contents dataset).--;
if index(years,'2013') then sortprio='1';
else if index(years,'2009') then sortprio='2';
else if index(years,' 2010') then sortprio='3';
else if index(years,'1990') then sortprio='4';
else sortprio='8';
end;
/*<=========================Comment out=====================================
length _first2 $2 _next3 $3;
drop _: ;
_first2=substr(memname,1,2); _next3=substr(memname,3,3);
if _first2 in ('us','mo') then setgroup=_first2; else setgroup='xx';
if _next3='com' then subtype='1cpm';
else if _next3=;'sc' then subtype='2sc';
else if _next3='cas' then subtype='4casrh';
else subtype='5other';
===========================End commented out================================ */
if subtype='casrh' then subtype='4casrh';
else if subtype='casrhalt' then subtype='4casrhalt';
else if subtype='com' then subtype='1com';
else if subtype='poptrends' then subtype='5other';
else if subtype='sc' or subtype='3sc' then subtype='2sc';
if index(memname,'huest') then subtype='4huest';
run;
/*<=========================Comment out=====================================
proc sort data=popests.datasets out=bysortprio; by sortprio; run;
proc sort data=popests.datasets out=tempsort ; by libname memname modified; run;
data popests.datasets; set tempsort;
by libname memname; if last.memname; *--keep the one with the latest modified value---;
run;
===========================End commented out================================ */
proc datasets library=popests nolist;
modify datasets;
index delete dataset memname;
index create dataset=(libname memname) / unique;
index create memname;
quit;
options mprint msglevel=i;
%*include '/pub/sas/macros/gendshtm_test.sas'; *<----We were doing interactive testing of revised macro 3-7-15--;
%gendshtm(libname=popests,debug=1,runprocc=0,sortby=sortprio subtype setgroup memname );
run;