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
Post a Comment