hi ... here is something similar to what you are trying to do me ... take the counties in New York State and form new geographic areas (HSAs) based on a set of rules that assign counties to HSAs you ... take zip codes in US and and form new geographic areas (regions) based on a set of rules that assign zip codes to regions I assume that you have a map data set with zip code boundaries you will have to create a new map data set with regions and you do that with PROC GREMOVE (see below) ... then you could create a choropleth map that is shaded by region based on you response data set this code started with a county-based map from the SAS MAPS library (maps.counties) and ends up with an HSA-based map ... 8 HSAs are shown instead of the 62 New York State counties this example is in a paper ... "The Basics of Map Creation with SAS/Graph" ... and you can get the paper plus all the examples at ... http://www.albany.edu/~msz03/map_basics.zip * rules for county to HSA conversion; proc format; value cou2hsa 3, 9, 13, 29, 37, 63, 73, 121 = '1' 15, 51, 55, 69, 97, 99, 101, 117, 123= '2' 11, 23, 43, 45, 49, 53, 65, 67, 75, 89, 109 = '3' 7, 17, 107 = '4' 1, 19, 21, 25, 31, 33, 35, 39, 41, 57, 77, 83, 91, 93, 95, 113, 115 = '5' 27, 71, 79, 87, 105, 111, 119 = '6' 5, 47, 61, 81, 85 = '7' 59, 103 = '8' ; * assign new geographic designation (HSA) to each New York State county from maps.counties data set; data hsatemp; set maps.counties; where state eq 36 and density lt 6; hsa = put(county,cou2hsa.); run; * sort map data set in order by new geographic designation; proc sort data=hsatemp; by hsa; run; * eliminate county boundaries with HSA areas using PROC GREMOVE; proc gremove data=hsatemp out=hsamap; by hsa; id county; run; * project the map; proc gproject data=hsamap out=hsaproj; id hsa; run; * create a dummy response data set ... one observation per new area; proc sql; create table hsa as select distinct hsa, 1 as var from hsamap; quit; * draw the map; goptions reset=all ftext='calibri' htext=2 gunit=pct; pattern v=ms c=blue; proc gmap data=hsa map=hsaproj; id hsa; choro var / discrete coutline=white nolegend; note ' HEALTH SERVICE AREAS' j=l ' AREAS FORMED FROM COUNTIES' j=l ' USING PROC GREMOVE'; run; quit;
... View more