Changing the Default Levels Algorithm

Reply
Contributor
Posts: 45

Changing the Default Levels Algorithm

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;

Grand Advisor
Posts: 10,239

Re: Changing the Default Levels Algorithm

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.

Contributor
Posts: 45

Re: Changing the Default Levels Algorithm

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

Grand Advisor
Posts: 10,239

Re: Changing the Default Levels Algorithm

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.

Contributor
Posts: 45

Re: Changing the Default Levels Algorithm

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

Ask a Question
Discussion stats
  • 4 replies
  • 176 views
  • 3 likes
  • 2 in conversation