x cd /pub/data/popests/Tools; %let pgm=invoke_dosets_intrcnsl; filename pgm "&pgm..sas";
/*--Invoke the %doset macro to create observations in the Datasets dataset for this popests/intrcnsl directory.
J. Blodgett, OSEDA, Oct., 2011
intrcnsl is an alias for intercensal20xx .
-- */
title "Job to Invoke doset Macro for Sets in popests/intrcnsl, creating intrcnsl.datasets";
libname popests '/pub/data/popests';
libname intrcnsl '/pub/data/popests/intrcnsl';
****proc sort data=intrcnsl.datasets nodupkeys; *** by memname; *** run;
%let libnameg=intrcnsl;
*-----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=intrcnsl,debug=1);
*----------------------------------------------------------------------;
options mprint;
/* ========================begin comment====================================
==========================end comment====================================== */
%doset(memname=_template_intrcnsl,
filetype=popests,
geouniv=United States,
units=%nrbquote(state county),
Years=%str(2000-2010),
CreatePgm=intercensal20xx,
Description=%nrbquote(Intercensal state and county estimates for decade 2000-2010. Contains revisions of the
Bureau post-censal estimates for the decade using the 2010 census counts, which are also included.),
keyvars=sumlev state county,
keyfmats=sumlev state county,
DataSource=%str(U.S. Bureau of the Census, FSCPE),
SortedBy=State 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.
),
SubType=intrcnsl,
SetGroup=us,
VarSet=,
URLMeta=%str(http://www.census.gov/popest/data/intercensal/county/county2010.html)
);
%doset(memname=usstcntytots,template=_template_intrcnsl,
memlabel=%nrbquote(Total Pops Only: US State and County estimates),
filetype=popests,
units=%nrbquote(state county),
UsageNotes=%nrbquote(- All estimates are as of July 1 of the year specified.
- No demographic detail on this data set.
- EstBase2k is the 2000 census figure adjusted to 2010 geography and reflecting changes from the CQR program
- Values for July 1, 2010 were produced by applying estimates of change in the population between April 1 and July 1 of 2010 to the
2010 Census counts.
),
debug=0);
%doset(memname=usstcntysexracehisp,template=_template_intrcnsl,
memlabel=%nrbquote(Estimates by Sex, Race and (Hispanic) Origin for US states & counties),
filetype=popests,
units=%nrbquote(state county sex-race-Hispanic combos ),
keyvars=sumlev state county sex race origin,
UsageNotes=%nrbquote(- There are 63 observations per geographic area. Sex (3), by Origin(3) and Race(7) are the
3 demographic dimensions. Each of the 3 class variables (Sex, Origin and Race) take on a value of 0 to indicate a summary that
does not consider that variable.
- Code values are:
Race: 0=Total 1=White 2=Black 3=American Ind and Alaska Native 4=Asian 5=Natv Hawaiian & Othr PI 6=Two or more races
Sex: 0=Total 1=Male 2=Female
Hispanic: 0=Total 1=Not Hispanic 2=Hispanic.
- Hispanic origin is considered an ethnicity, not a race. Hispanics may be of any race.
- EstBase2k is the 2000 census figure adjusted to 2010 geography and reflecting changes from the CQR program
- Details on methodology are available at http://www.census.gov/popest/methodology/intercensal_nat_meth.pdf.
),
URLMeta=%str(http://www.census.gov/popest/data/intercensal/county/county2010.html),
debug=0);
%doset(memname=usstcntyagesex5yr,template=_template_intrcnsl,
memlabel=%nrbquote(Estimates by age and sex for US states & counties),
units=%nrbquote(state county sex-age combos),
keyvars=sumlev state county sex agegrp,
filetype=popests,
UsageNotes=%nrbquote(- There are 57 observations per geographic area. Sex (3), by Origin(3) and Race(7) are the
3 demographic dimensions. Each of the 3 class variables (Sex, Origin and Race) take on a value of 0 to indicate a summary that
does not consider that variable.
- Code values are:
Sex: 0=Total 1=Male 2=Female
AgeGrp: 00 = Total
01 = Age 0 to 4 years
02 = Age 5 to 9 years
03 = Age 10 to 14 years
04 = Age 15 to 19 years
05 = Age 20 to 24 years
06 = Age 25 to 29 years
07 = Age 30 to 34 years
08 = Age 35 to 39 years
09 = Age 40 to 44 years
10 = Age 45 to 49 years
11 = Age 50 to 54 years
12 = Age 55 to 59 years
13 = Age 60 to 64 years
14 = Age 65 to 69 years
15 = Age 70 to 74 years
16 = Age 75 to 79 years
17 = Age 80 to 84 years
18 = Age 85 years and older
- EstBase2k is the 2000 census figure adjusted to 2010 geography and reflecting changes from the CQR program
- Details on methodology are available at http://www.census.gov/popest/methodology/intercensal_nat_meth.pdf.
),
URLMeta=%str(http://www.census.gov/popest/data/intercensal/county/county2010.html),
debug=0);
proc sort data=intrcnsl.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 intrcnsl.datasets (Sorted by SortPrio)';
run ;
proc datasets library=intrcnsl nolist;
modify datasets;
index delete dataset memname;
index create dataset=(libname memname) / unique;
index create memname;
quit;
options mprint msglevel=i;
%gendshtm(libname=intrcnsl,debug=1,runprocc=1);