Data visualization with SAS programming

boxplot

Reply
Occasional Contributor
Posts: 11

boxplot

Hi

I have facing problem to produce box plot for wide range dataset. Please give me some hints. So, that I can produce box plot. I have attached my data. Thanks

 

Super User
Posts: 11,343

Re: boxplot

Posted in reply to mukeshmehata1

Have you brought your data into SAS?

 

After you have data in SAS, Proc Sgplot would be one way to start. One example is here : http://support.sas.com/kb/43/090.html

Occasional Contributor
Posts: 11

Re: boxplot

Actually, I want to produce box plot with the different months (png file is attached which I produced using by r). If you have any ideas to produce such kind of plots, I will be grateful. Thanks

SAS Super FREQ
Posts: 1,171

Re: boxplot

Posted in reply to mukeshmehata1

See article:  http://blogs.sas.com/content/graphicallyspeaking/2016/12/08/getting-started-sgplot-part-3-vbox/

You will need to convert your multi-column data into grouped data, with two columns, Month and Temperature.

Super User
Super User
Posts: 7,976

Re: boxplot

Posted in reply to mukeshmehata1

Go to this blog, there is examples with code on pretty much any graph you can think of:

http://blogs.sas.com/content/graphicallyspeaking/

Super User
Posts: 19,822

Re: boxplot

Posted in reply to mukeshmehata1

@mukeshmehata1 Please post what you've tried so far and we'll be happy to help you. This looks like homework, so you're unlikely to find someone to provide the exact answer. 

Occasional Contributor
Posts: 11

Re: boxplot

Hi 

I have transposed the data. I got Jan to Dec under _NAME_ and produced COL1 to COl 66 as temperature obs. If I can arrange those data then I can produce box plot with the different month. I Don't know how to arrange these columns. So that I will have 66 temp points in each month. Attached file is here.

 

Thanks

Occasional Contributor
Posts: 11

Re: boxplot

Posted in reply to mukeshmehata1
Yeah It's a homework. But I don't expect to get all the solution. I just need hints. Then, I can do remaining portion.
Super User
Posts: 19,822

Re: boxplot

Posted in reply to mukeshmehata1

mukeshmehata1 wrote:
Yeah It's a homework. But I don't expect to get all the solution. I just need hints. Then, I can do remaining portion.

This is now different from your original question, so it's getting hard to follow. What do you need answered how?

Please post what you ahve and what you want as examples. For reformatting data from wide to long, look into PROC TRANSPOSE

Occasional Contributor
Posts: 11

Re: boxplot

Yeah I want helping to generate simple code so that I will have 2 columns. One column is with Jan to Dec and another col is temp value
Super User
Posts: 19,822

Re: boxplot

[ Edited ]
Posted in reply to mukeshmehata1

https://stats.idre.ucla.edu/sas/modules/reshaping-data-wide-to-long-using-a-data-step/

 

Follow the examples above.

 

EDIT: the first example is manual the second array method is probably what you'll find the easiest to understand. 

Occasional Contributor
Posts: 11

Re: boxplot

Thank you! It worked.
Occasional Contributor
Posts: 11

Re: boxplot

I Just want two columns only..one is Month and another is temp value. So, I will have total rows = 12*66
Ask a Question
Discussion stats
  • 12 replies
  • 272 views
  • 3 likes
  • 5 in conversation