BookmarkSubscribeRSS Feed
michelconn
Quartz | Level 8

Hello all I had a question about how to change the default levels algorithm or suggestions on how to better represent my data. I have some data that has a very large positive skew and I want to map frequencies per county on my state. I feel as if using the default levels algorithm is really misrepresenting my data and wanted to change the default levels algorithm to perhaps logarithmic. Does any one know how to do that or have suggestions on how to better represent the data? Below is the code I am using to create the map. Thanks

pattern1 v=s c=CXFFFFFF;

*pattern2 v=s c=CXC3E9FF;

pattern2 v=s c=CX87D3FF;

*pattern4 v=s c=CX4BBDFF;

pattern3 v=s c=CX0FA7FF;

pattern4 v=s c=CX0085D2;

pattern5 v=s c=CX005F96;

legend1 across=1

cborder=black

position=(bottom left inside)

mode=protect

label=(h=1 position=top justify=center f=simplex)

offset=(4pct)

shape=bar(2,1);

title h=2 f=duplex 'Number Per County';

proc gmap data=pro.Per_capita map=pro.state;

    id county;

    choro count / levels=5 alg=logarithmic

    legend=legend1

    coutline=black;

run;

quit;

4 REPLIES 4
ballardw
Super User

Take a look at your data with something such as proc freq and pick likely points to use the MIDPOINTS option instead of LEVEL. Midpoint values are set by you and do not have to be equal intervals.

michelconn
Quartz | Level 8

Thanks for the response I had considered that or setting up my own formatted bins. I also have some data that is a little messy and will be slightly difficult to set up bins or midpoints (tiny decimals) for so I has hoping for a more automated way. But if that is my best bet I'll go for it. Thanks

ballardw
Super User

It isn't trivial but not terribly difficult to summarize the data using something like Proc Summary and get some percentile points that could be placed into macro variables for use as the midpoint values.

michelconn
Quartz | Level 8

I just ended up formatting my own bins and manipulating the data to be per 10,000 instead of per capita. Thanks for the help

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 4 replies
  • 505 views
  • 3 likes
  • 2 in conversation