x cd /pub/data/popests/Tools; %let pgm=uscomp2000_2010; filename pgm "&pgm..sas"; *----We process the county level 2010 vintage "Evaluation Estimates" from the Bureau 3-12 (see http://www.census.gov/popest/research/eval-estimates/eval-est2010.html ) to get estimates by state and county of the decade-long change in population broken down by births, deaths and estimated net migration. We merge these data with the 2011 vintage post-2010-censal data with births and deaths in the A-J period of 2010, which we subtract from the 2009-2010 counts on the eval ests. jgb, OSEDA, under a contract with the Missouri Census Data Center. ---*; libname popests '/pub/data/popests'; filename in "/pub/data/popests/rawdata/CO-EST2010-ALLDATA.csv"; data evalest2010; length SumLev $3 Reg $1 Div $1 State $2 cnty $3 _stname $32 Stab $2 FIPCO $5 Areaname $64 Popcen2k Pop00C 5; infile in dsd lrecl=1024 firstobs=2 missover; input SumLev--_stname Areaname--Pop00C _est00 _est1-_est10 _npopchg00 _npopchg1-_npopchg10 _births00 _births1-_births10 _deaths00 _deaths1-_deaths10 ; **do NOT need to read the rest*** _natinc00 _natinc1-_natinc10 _intermig00 _intermig1-_intermig10 _dommig00 _+dommig1-_dommig10; *---Get the decade totals + 2nd qtr 2010----; birthsPlus=sum(of _births00 _births1-_births10); deathsPlus=sum(of _deaths00 _deaths1-_deaths10); births10=_births10; deaths10=_deaths10; *---save these components for the "missing" estiamtes year---; stab=put(state,$fipstab2.); if cnty='000' then cnty=' '; if sumlev='050' then FIPCO=state||cnty; else FIPCO=state; drop _: ; label birthsPlus='Evaluation est Births 4-1-2000 to 6-30-2010' deathsPlus='Evaluation est Deaths 4-1-2000 to 6-30-2010' births10='Births 7-1-09 to 7-1-10' deaths10='Deaths 7-1-09 to 7-1-10'; run; proc print data=evalest2010(obs=200) label; format areaname $16.; run cancel; data popests.uscom00_10(label="Shows Pop Change Components for the decade by State and County"); merge evalest2010(in=in1) popests.uscom11(in=in2 keep=CBSA--Stab cnty Pop10c Brthaj10 dthaj10); by state cnty; length default=5; if not (in1 and in2) then do; _nomatch+1; put "***NO match!! " in1= in2= sumlev= state= cnty= areaname= ; if in2; end; Births=BirthsPlus-Brthaj10; Deaths=DeathsPlus-Dthaj10; NatInc=Births-Deaths; label Births='Total Births 4-1-00 to 3-31-10' Deaths='Total Deaths 4-1-00 to 3-31-10' NatInc='Natural Increase, 4-1-00 to 3-31-10'; attrib Popchang label="Population Change Over Decade" format=comma7. ; attrib PctChang label='% Change in Pop Over Decade' format=5.1; label popcen2k="Orig 2k census pop, not adjusted"; PopChang=Pop10c - Pop00c; if in1 then PctChang=100*PopChang/pop00c; format pop00c pop10c comma9.; drop _: ; *---We estimate net migration over the decade here!-----*; NetMigEst=Popchang - NatInc; label NetMigEst="Est Net Migration 4-1-00 to 3-31-10"; run;