Halloween 2011 count

[This article was first published on The stupidest thing... » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

We don’t get many kids seeking candy at our house. I’m not sure if there just aren’t many kids in the neighborhood, or if it’s our location (next to the pond, with a big gap before the next house).

I decided to keep track. As usual, we bought a huge bag of candy, and we still had about half of it left to hand out tonight. But only 19 kids came.

They arrived pretty regularly from 5:50 to 7:50.

I comment on the figure’s style below.

In the above graph, I’m applying ideas learned from Dan Carr when I visited the statistics department at George Mason in September, to give a seminar. (I had a great time at GMU, particularly talking to Dan about graphics. I had a copy of his book about micromaps on my iPad, but hadn’t really looked at it until after I met him. Take a look at the first chapter; it’s full of good ideas and may convince you to read the rest.)

  • The gray background makes the figure stand out on the “page”. (I had disliked this aspect of ggplot2 plots (for example, this one), but Dan convinced me that it’s better.)
  • The black border around the figure is important. (Dan pointed out that it’s not the gray background I dislike about the default ggplot2 plots, but the lack of the border.)
  • The white grid lines make it easy to see the details, and they still don’t get in the way of the plot.
  • With the grid lines, you don’t need to include tick marks, but can just use proximity. (Note that the labels can and should be closer to the plot when there are no bristles ticks.)
  • The use of color for the actual data makes them stand out better.

Update: The code I used for the figure is here. It’s old-fashioned and inefficient, but it works.

To leave a comment for the author, please follow the link and comment on their blog: The stupidest thing... » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)