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;
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 ...
1 = '0 to .2'
2 = '.2 to .3'
3 = '.3 to .4'
4 = '.4 to .5'
5 = 'over .5'
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;
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.
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.