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;
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.
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
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.
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
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.
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.