Thursday, February 07, 2013

Review of the R Graphics Cookbook by Winston Chang

R Graphics CookbookR Graphics Cookbook by Winston Chang
My rating: 4 of 5 stars

If using the grammer of graphics as implemented in ggplot2 is like learning a new language, the R Graphics Cookbook is not a book that tries to teach you a new language, rather it is like learning a language through using it and is a different take on ggplot2 and graphics in R than other ggplot2 books.

ggplot2 has always presented itself as learning another language. And while it seems that a grammer of graphics is the right way to go I have always had a hard time getting a handle on it. But while the idea that you can build graphs through a grammer with a consistent meaning is elegant, sometimes you need to start by accomplishing a task. R Graphics Cookbook becomes very much like a phrase book you need to get started. Some of the earlier chapters cover categories of graphs and work you through the variations. Other chapters focus on the graph annotations, titles, axis, labels, etc. And since this is a grammer, you are assured that this is applicable to all of the types of graphs that were covered earlier.

Another aspect of this book that is helpful is the chapter on data munging. While this book focuses on graphics, the principle library, ggplot2, requires that data has been shaped into data frames before using it. But this becomes an overhead that I'm not used to coming from other graphics and plotting paradigms such as in Matlab, Python, Excel, etc. So the chapter on getting data into shape is important. This includes creating data frames, creating new data frames for purposes of generating graphics, and modifying data frames so that they yield more elegant graphics.

I still think I will have to understand the gglot2 book to understand the grammer of graphics in detail, but this book is better for me to get work done, and may make the difference between using ggplot with its elegance rather than other graphics libraries that I use when I get frustrated by the overhead to get started.

View all my reviews

 I review for the O'Reilly Blogger Review Program

Saturday, February 02, 2013

Parenting: 27 months - Back to daycare

I want to go that way

We have had the benefit of having my in-laws staying with us for several months again. Alas, all good things come to an end and they returned to China. My son is especially sad because that means he had to go back to day care. And he reacted the same way as before. With marathon crying sessions (he has the endurance that befits the son of two marathon runners.) But by the end of the first week, he was at the point where he was not crying all the time. And we suspect he even played enough to learn a song or two. He has never been good about playing with other kids, so that would be the next milestone to hope for.

This month also saw being more engaged with the world. Doors are meant to be opened and passed through. Button's are to be pushed.

He has turned into a little recorder, with a surprising ability to repeat words. Fortunately, these have been pleasant surprises, like 'Fiddlesticks', not embarrassing ones :-)  There are a number of books in the bedtime rotation that he know can say most of the stories.  I joke that when it is bedtime his job is to read to daddy, not the other way around. Current favorites are "Someone is coming to this house (a story of the nativity from the point of view of barn animals anticipating a visit) and A Book of Sleep (a story of an owl observing everyone else going to sleep at night).  Before he started day care we went to a performance night at the daycare and taught him some of the songs and dances that they learned there.  That was very easy to pick up and we can set songs on repeat for him to dance away on his own.

Next goals:  playing well with others.  Hopefully daycare will help here.

My companion at the PSO Fiddlesticks