I visit:
http://lib.stat.cmu.edu/DASL/Datafiles/DraftLottery.html
Then I select all of the lottery data and paste and save it in a file named lottery.txt on my system. I can then import the file in Mathematica via:
lotterydata = Import["/Users/davidarnold/Documents/temp/lottery.txt","Table"];
Now, if I were using RStudio and R, where the data set includes the headers (which I didn't include in my Mathematica attempt), I could create box plots for each month with the following command.
boxplot(Draft_No. ~ Mo.Number, data=lotterydata)
Which would produce this image.
What is the simplest way I can do this in Mathematica?
I've come up with a method:
months = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug",
"Sep", "Oct", "Nov", "Dec"};
data = Table[
Cases[lotterydata, {_, _, m, _, num_} -> num], {m, 1, 12}];
BoxWhiskerChart[data,
ChartStyle -> 10,
ChartLabels -> months]
Which produces this image:
Still, is there a simpler way? This was a real struggle to figure this out.