BookmarkSubscribeRSS Feed
hzt7
Calcite | Level 5

I'm just running some very basic code and wondering what the weird lines are and how to get rid of them. (NOTE this is the country of Georgia, not the state of Georgia).

 

proc gmap
data=mapsgfk.georgia
map=mapsgfk.georgia;
id id1;
choro id1 ;
run;
quit;

 

georgia.png

 
2 REPLIES 2
Rick_SAS
SAS Super FREQ

I think the problem is that this data set has both ID and ID1 variables. Try this:

 

proc gmap data=mapsgfk.georgia
map=mapsgfk.georgia;
id ID;
choro id1;
run;
quit;
ballardw
Super User

The general behavior results from polygons at one level not being quite closed in regards to the id variable.

Here's a brief example:

data example;
   input id x y id2;
datalines;
1 10 10 1 
1 10 15 1 
1 15 15 1 
1 15 10 1 
1 16 27 2 
1 25 27 2 
1 25 12 2 
1 16 12 2 
;
run;

proc gmap map=example data=example;
   id id;
   choro id;
run;
quit;


proc gmap map=example data=example;
   id id2;
   choro id2;
run;
quit;

Note that for ID the boundary continues (connects to) the area identified with id2 when using ID.

 

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 605 views
  • 0 likes
  • 3 in conversation