goptions target=ps ftext=swiss htext=2pct rotate=landscape; /* Data on the number of teams in each Canadian province */ /* See Table 29.2 in SAS/GRAPH SOFTWARE: REFERENCE for */ /* a list of province codes and state FIPS codes */ data canteams; input province $2. teams; cards; 24 2 /* Quebec */ 35 2 /* Ontario */ 46 1 /* Manitoba */ 48 2 /* Alberta */ 59 1 /* British Columbia */ run; /* Data on the number of teams in each US state */ data usteams; input staten $2. teams; state=stfips(staten); cards; CA 3 CT 1 DC 1 FL 2 IL 1 MA 1 MI 1 MO 1 NJ 1 NY 2 PA 2 TX 1 run; /* Combine the two response data sets */ data allteams; set canteams usteams; run; /* Combine the CANADA4 and STATES map data sets */ data mapall; set maps.canada4 maps.states(where=(state not in(15 72))); /* remove Hawaii and Puerto Rico */ run; /* Project the combined map using the Gnomonic projection with the */ /* POLELONG= option to center the new map near the middle of */ /* the United States and Canada. */ proc gproject data=mapall out=projmap project=gnomon polelong=100; id province state; run; /* Produce the map */ proc gmap data=allteams map=projmap all; id province state; choro teams / discrete coutline=black legend=legend1; pattern1 v=s c=graydd; pattern2 v=s c=gray77; pattern3 v=s c=black; title1 f=swissb h=5pct 'NATIONAL HOCKEY LEAGUE TEAMS'; title2 f=swiss h=3pct 'BY PROVINCE AND STATE'; legend1 label=(f=swiss 'Number of teams:'); run; quit;