BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
AAWTomHanks
Calcite | Level 5


Hi,

I am trying to draw 10 mile radius circles around my locations on a map. Does someone know how to do this?

Here is my code:

/**FOR A COUNTIES MAP THE X AND Y COORDANIATES NEED TO BE CHANGED SO THIS IS DONE HERE**/ DATA P1; SET P1(WHERE=(STATE=34));   X=ATAN(1)/45 * LONG;   Y=ATAN(1)/45 * LAT; RUN; /**MAKE STAR MARKER OR ANOTHER TYPE OF MARKER**/ DATA P;/*ANNOTATE DATA SET*/ SET P1;/*PROVIDER DATA WITH X/Y*/ LENGTH FUNCTION STYLE COLOR $ 8 TEXT $4; XSYS = '2'; YSYS = '2';  HSYS = '3'; WHEN = 'A';  /**MAKE STAR MARKER OR ANOTHER TYPE OF MARKER**/ FUNCTION='LABEL'; STYLE='MARKER'; TEXT='V' SIZE = 1.75; IF PILOT='P' THEN COLOR='BILG';/**GREEN**/ IF PILOT='E' THEN COLOR='ORANGE';/**ORANGE**/ IF PILOT='A' THEN COLOR='CXFF0000';/**RED**/ IF COUNT=1 THEN POSITION='5'; IF COUNT=2 THEN POSITION='A'; IF COUNT=3 THEN POSITION='F'; OUTPUT; RUN;

Thanks.


1 ACCEPTED SOLUTION

Accepted Solutions
GraphGuy
Meteorite | Level 14

That's in Example 24 in my book "SAS/Graph: Beyond the Basics".

Here's the sas code, and sample output...

Public Radio Stations in NC (SAS/Graph gmap)

http://robslink.com/SAS/book/example24.sas

View solution in original post

3 REPLIES 3
GraphGuy
Meteorite | Level 14

That's in Example 24 in my book "SAS/Graph: Beyond the Basics".

Here's the sas code, and sample output...

Public Radio Stations in NC (SAS/Graph gmap)

http://robslink.com/SAS/book/example24.sas

AAWTomHanks
Calcite | Level 5

Thanks very helpful.

Quick question...when using levels for the CHORO option is there a way to tell the bottom level to use zero?

Thanks.

GraphGuy
Meteorite | Level 14

I don't think there's an option to force the legend levels to start at zero, but you could probably insert a 'fake' item into your data (that doesn't match any real map areas), and give it a value of zero.

But when I care about the legend ranges (or 'buckets' as they are sometimes called), I usually take full control, and create a new variable, and then a user-defined format to make the text in the legend show up the way I want, such as ...

proc format;

value winefmt

1 = '0 to .2'

2 = '.2 to .3'

3 = '.3 to .4'

4 = '.4 to .5'

5 = 'over .5'

;

run;

data my_data (drop=all decile); set my_data (where=(state_name^='District of Columbia'));

format wine_bucket winefmt.;

if wine<=.2 then wine_bucket=1;

else if wine<=.3 then wine_bucket=2;

else if wine<=.4 then wine_bucket=3;

else if wine<=.5 then wine_bucket=4;

else wine_bucket=5;

run;

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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