x cd /pub/data/acs2006/Tools; %let pgm=acs_counties_by_size; filename pgm "&pgm..sas"; *---generate a report showing for each state how many counties fall into each of the 3 size categories critical vis-a-vis getting data published in the ACS. The report is stored in the /pub/webrepts directory. jgb, 12-29-07. ---; options nodate ps=240; title 'Report 1: Number of Counties In Size Categories Relevant to ACS Data Release'; title2 'Based on July 1, 2006 Population Estimates'; footnote "Report Produced by Missouri Census Data Center"; footnote2 h=1 "From setup in acs2006/Tools/&pgm..sas"; libname popests '/pub/data/popests' access=readonly; ods html file="/pub/reports/&pgm..html" style=sasweb; proc format; value popcat 0-19999='Under 20000' 20000-64999='20000 to 64999' 65000-high='65000 and over'; run; data landsqmi02; *---we used Geocorr to generate a CSV file with land areas for 2002 counties in CO and VA only-; infile cards dsd ; length County $5 State $2 landsqmi02 5; input County _dum $ _cntyname $ landsqmi02; State=substr(county,1,2); SumLev='050'; drop _:; cards; "08001"," ","Adams CO",1179.972,1 "08003"," ","Alamosa CO",722.743,1 "08005"," ","Arapahoe CO",803.145,1 "08007"," ","Archuleta CO",1350.225,1 "08009"," ","Baca CO",2555.718,1 "08011"," ","Bent CO",1513.903,1 "08013"," ","Boulder CO",732.707,1 "08014"," ","Broomfield CO",27.113,1 "08015"," ","Chaffee CO",1013.451,1 "08017"," ","Cheyenne CO",1781.349,1 "08019"," ","Clear Creek CO",395.448,1 "08021"," ","Conejos CO",1287.216,1 "08023"," ","Costilla CO",1227.104,1 "08025"," ","Crowley CO",788.995,1 "08027"," ","Custer CO",738.887,1 "08029"," ","Delta CO",1142.106,1 "08031"," ","Denver CO",153.351,1 "08033"," ","Dolores CO",1066.966,1 "08035"," ","Douglas CO",840.112,1 "08037"," ","Eagle CO",1687.875,1 "08039"," ","Elbert CO",1850.781,1 "08041"," ","El Paso CO",2126.449,1 "08043"," ","Fremont CO",1532.93,1 "08045"," ","Garfield CO",2947.057,1 "08047"," ","Gilpin CO",149.868,1 "08049"," ","Grand CO",1846.675,1 "08051"," ","Gunnison CO",3238.814,1 "08053"," ","Hinsdale CO",1117.685,1 "08055"," ","Huerfano CO",1590.867,1 "08057"," ","Jackson CO",1613.213,1 "08059"," ","Jefferson CO",768.606,1 "08061"," ","Kiowa CO",1770.992,1 "08063"," ","Kit Carson CO",2160.871,1 "08065"," ","Lake CO",376.893,1 "08067"," ","La Plata CO",1692.15,1 "08069"," ","Larimer CO",2601.301,1 "08071"," ","Las Animas CO",4772.634,1 "08073"," ","Lincoln CO",2586.093,1 "08075"," ","Logan CO",1838.524,1 "08077"," ","Mesa CO",3327.746,1 "08079"," ","Mineral CO",875.719,1 "08081"," ","Moffat CO",4742.254,1 "08083"," ","Montezuma CO",2036.633,1 "08085"," ","Montrose CO",2240.612,1 "08087"," ","Morgan CO",1285.361,1 "08089"," ","Otero CO",1262.856,1 "08091"," ","Ouray CO",540.468,1 "08093"," ","Park CO",2200.691,1 "08095"," ","Phillips CO",687.622,1 "08097"," ","Pitkin CO",970.421,1 "08099"," ","Prowers CO",1640.382,1 "08101"," ","Pueblo CO",2388.687,1 "08103"," ","Rio Blanco CO",3220.97,1 "08105"," ","Rio Grande CO",911.605,1 "08107"," ","Routt CO",2361.588,1 "08109"," ","Saguache CO",3168.436,1 "08111"," ","San Juan CO",387.423,1 "08113"," ","San Miguel CO",1286.503,1 "08115"," ","Sedgwick CO",548.236,1 "08117"," ","Summit CO",608.162,1 "08119"," ","Teller CO",557.063,1 "08121"," ","Washington CO",2520.98,1 "08123"," ","Weld CO",3990.532,1 "08125"," ","Yuma CO",2365.792,1 "51001"," ","Accomack VA",455.244,1 "51003"," ","Albemarle VA",722.607,1 "51005"," ","Alleghany VA",447.717,1 "51007"," ","Amelia VA",356.801,1 "51009"," ","Amherst VA",475.175,1 "51011"," ","Appomattox VA",333.686,1 "51013"," ","Arlington VA",25.87,1 "51015"," ","Augusta VA",970.364,1 "51017"," ","Bath VA",531.863,1 "51019"," ","Bedford VA",754.501,1 "51021"," ","Bland VA",358.668,1 "51023"," ","Botetourt VA",542.657,1 "51025"," ","Brunswick VA",566.14,1 "51027"," ","Buchanan VA",503.881,1 "51029"," ","Buckingham VA",580.857,1 "51031"," ","Campbell VA",504.482,1 "51033"," ","Caroline VA",532.524,1 "51035"," ","Carroll VA",476.339,1 "51036"," ","Charles City VA",182.762,1 "51037"," ","Charlotte VA",474.995,1 "51041"," ","Chesterfield VA",425.754,1 "51043"," ","Clarke VA",176.616,1 "51045"," ","Craig VA",330.61,1 "51047"," ","Culpeper VA",381.003,1 "51049"," ","Cumberland VA",298.447,1 "51051"," ","Dickenson VA",331.714,1 "51053"," ","Dinwiddie VA",503.674,1 "51057"," ","Essex VA",257.766,1 "51059"," ","Fairfax VA",395.045,1 "51061"," ","Fauquier VA",649.7,1 "51063"," ","Floyd VA",381.215,1 "51065"," ","Fluvanna VA",287.37,1 "51067"," ","Franklin VA",692.084,1 "51069"," ","Frederick VA",414.626,1 "51071"," ","Giles VA",357.329,1 "51073"," ","Gloucester VA",216.612,1 "51075"," ","Goochland VA",284.428,1 "51077"," ","Grayson VA",442.639,1 "51079"," ","Greene VA",156.58,1 "51081"," ","Greensville VA",295.44,1 "51083"," ","Halifax VA",819.296,1 "51085"," ","Hanover VA",472.679,1 "51087"," ","Henrico VA",238.06,1 "51089"," ","Henry VA",382.352,1 "51091"," ","Highland VA",415.857,1 "51093"," ","Isle of Wight VA",315.867,1 "51095"," ","James City VA",142.922,1 "51097"," ","King and Queen VA",316.264,1 "51099"," ","King George VA",179.998,1 "51101"," ","King William VA",275.433,1 "51103"," ","Lancaster VA",133.143,1 "51105"," ","Lee VA",437.135,1 "51107"," ","Loudoun VA",519.851,1 "51109"," ","Louisa VA",497.139,1 "51111"," ","Lunenburg VA",431.703,1 "51113"," ","Madison VA",321.421,1 "51115"," ","Mathews VA",85.684,1 "51117"," ","Mecklenburg VA",623.933,1 "51119"," ","Middlesex VA",130.298,1 "51121"," ","Montgomery VA",388.219,1 "51125"," ","Nelson VA",472.355,1 "51127"," ","New Kent VA",209.546,1 "51131"," ","Northampton VA",207.374,1 "51133"," ","Northumberland VA",192.302,1 "51135"," ","Nottoway VA",314.652,1 "51137"," ","Orange VA",341.704,1 "51139"," ","Page VA",311.125,1 "51141"," ","Patrick VA",483.143,1 "51143"," ","Pittsylvania VA",970.76,1 "51145"," ","Powhatan VA",261.278,1 "51147"," ","Prince Edward VA",352.763,1 "51149"," ","Prince George VA",265.617,1 "51153"," ","Prince William VA",337.784,1 "51155"," ","Pulaski VA",320.566,1 "51157"," ","Rappahannock VA",266.573,1 "51159"," ","Richmond VA",191.458,1 "51161"," ","Roanoke VA",250.866,1 "51163"," ","Rockbridge VA",599.627,1 "51165"," ","Rockingham VA",851.15,1 "51167"," ","Russell VA",474.658,1 "51169"," ","Scott VA",536.58,1 "51171"," ","Shenandoah VA",512.205,1 "51173"," ","Smyth VA",452.087,1 "51175"," ","Southampton VA",599.555,1 "51177"," ","Spotsylvania VA",400.862,1 "51179"," ","Stafford VA",270.351,1 "51181"," ","Surry VA",279.089,1 "51183"," ","Sussex VA",490.729,1 "51185"," ","Tazewell VA",519.743,1 "51187"," ","Warren VA",213.698,1 "51191"," ","Washington VA",562.86,1 "51193"," ","Westmoreland VA",229.181,1 "51195"," ","Wise VA",404.042,1 "51197"," ","Wythe VA",463.242,1 "51199"," ","York VA",105.65,1 "51510"," ","Alexandria city VA",15.178,1 "51515"," ","Bedford city VA",6.888,1 "51520"," ","Bristol city VA",12.899,1 "51530"," ","Buena Vista city VA",6.831,1 "51540"," ","Charlottesville city VA",10.262,1 "51550"," ","Chesapeake city VA",340.719,1 "51570"," ","Colonial Heights city VA",7.476,1 "51580"," ","Covington city VA",5.672,1 "51590"," ","Danville city VA",43.061,1 "51595"," ","Emporia city VA",6.893,1 "51600"," ","Fairfax city VA",6.31,1 "51610"," ","Falls Church city VA",1.986,1 "51620"," ","Franklin city VA",8.353,1 "51630"," ","Fredericksburg city VA",10.518,1 "51640"," ","Galax city VA",8.228,1 "51650"," ","Hampton city VA",51.781,1 "51660"," ","Harrisonburg city VA",17.561,1 "51670"," ","Hopewell city VA",10.243,1 "51678"," ","Lexington city VA",2.494,1 "51680"," ","Lynchburg city VA",49.391,1 "51683"," ","Manassas city VA",9.934,1 "51685"," ","Manassas Park city VA",2.492,1 "51690"," ","Martinsville city VA",10.956,1 "51700"," ","Newport News city VA",68.294,1 "51710"," ","Norfolk city VA",53.728,1 "51720"," ","Norton city VA",7.53,1 "51730"," ","Petersburg city VA",22.881,1 "51735"," ","Poquoson city VA",15.516,1 "51740"," ","Portsmouth city VA",33.16,1 "51750"," ","Radford city VA",9.818,1 "51760"," ","Richmond city VA",60.07,1 "51770"," ","Roanoke city VA",42.884,1 "51775"," ","Salem city VA",14.588,1 "51790"," ","Staunton city VA",19.708,1 "51800"," ","Suffolk city VA",400.02,1 "51810"," ","Virginia Beach city VA",248.292,1 "51820"," ","Waynesboro city VA",15.36,1 "51830"," ","Williamsburg city VA",8.545,1 "51840"," ","Winchester city VA",9.334,1 run; data uscom06; merge popests.uscom06(keep=state sumlev popest county) sf3x.usstcnty(keep=sumlev state county landsqmi) landsqmi02(in=in02); by county; where sumlev='050'; if state ne '72'; if in02 then landsqmi=landsqmi02; format state $state. popest popcat.; label state=' '; label popest=' Counties by Pop Category'; if popest=. or landsqmi=. then put / _all_; run; proc freq data=uscom06; table state*popest; run; proc freq data=uscom06; weight popest; title 'Report 2: Number of Persons in Counties by Size Categories Relevant to ACS Data Release'; title2 'Based on July 1, 2006 Population Estimates'; table state*popest/format=comma11.; label popest='Persons in Counties by Pop Category'; run; proc freq data=uscom06; weight landsqmi; title 'Report 3: Land Area in Square Miles of Counties by Size Categories Relevant to ACS Data Release'; title2 'Using Land Areas as Reported in 2000 Census'; table state*popest/format=comma11.; label popest='Square Miles of Land in Counties by Pop Category'; run; ods html close;