- Paperback: 416 pages
- Publisher: O'Reilly Media; 1 edition (January 6, 2013)
- Language: English
- ISBN-10: 1449316956
- ISBN-13: 978-1449316952
- Product Dimensions: 7 x 0.9 x 9.2 inches
- Shipping Weight: 1.6 pounds (View shipping rates and policies)
- Average Customer Review: 83 customer reviews
- Amazon Best Sellers Rank: #61,919 in Books (See Top 100 in Books)
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
R Graphics Cookbook: Practical Recipes for Visualizing Data 1st Edition
Use the Amazon App to scan ISBNs and compare prices.
The Amazon Book Review
Author interviews, book reviews, editors picks, and more. Read it now
Frequently bought together
Customers who bought this item also bought
Q&A with Winston Chang, author of "R Graphics Cookbook: Practical Recipes for Visualizing Data"
Q. Why is your book timely?
A. Interest in R for data analysis and visualization has exploded in recent years. In the computer-tech world, computers and networks have made it much easier to gather and organize data, and more and more people have recognized that there's useful information to be found. To illustrate, consider the job "data scientist": this is a job title that didn't even exist five years ago, and now it's one of the hottest tickets on the market.
At the same time, there's been a swell of interest in R in its more traditional setting, in science and engineering. I think there are many reasons for this. One, is that there's a growing recognition outside of the computer-programmer world that learning a little programming can save you a lot of time and reduce errors. Another reason is that the last few years have seen an improvement in the user-friendliness of tools for using R.
So there's a lot of interest in using R for finding information in data, and visualization an essential tool for doing this. Data visualizations can help you understand your data and find patterns when you're in the exploratory phase of data analysis, and they are essential for communicating your findings to others.
Q. What information do you hope that readers of your book will walk away with?
A. As my book is a Cookbook, the primary goal is to efficiently present solutions for visualizing data, without demanding a large investment of time from the reader. For many readers, the goal is to just figure out how to make a particular type of graph and be done with it.
There are others who will want to gain a deeper understanding of how graphing works in R. For these readers, I've written an appendix on the graphing package ggplot2, which is used extensively in the recipes in the book. This appendix explains some of the concepts in the grammar of graphics, and how they relate to structures common to data visualizations in general.
Finally, I hope that readers will find ideas and inspiration for visualizing their data by browsing the pages and looking at the pictures.
Q. What's the most exciting/important thing happening in your space?
A. I'm excited that R is becoming more and more accessible to users who don't primarily identify as programmers. Many scientists, engineers, and data analysts have outgrown programs that provide canned data analysis routines, and they're turning increasingly to R. The growing popularity of R is part of a virtuous circle: as R gains a larger user base, it encourages people to create better educational materials and programming tools for R, which in turn helps to grow the number of R users.
Technology-wise, I'm excited by Shiny, which is a framework for bringing R analyses to the web. (I should mention that this it's part of my job to work on the development of Shiny.) This makes it possible to build interactive applications for data analysis and visualization for users who don't need to know R, or even that the application is backed by R.
About the Author
Winston Chang is a software engineer at RStudio, where he works on data visualization and software development tools for R. He holds a Ph.D. in Psychology from Northwestern University. During his time as a graduate student, he created a website called "Cookbook for R", which contains recipes for handling common tasks in R. In previous lives, he was a philosophy graduate student and a computer programmer.
Top customer reviews
There was a problem filtering reviews right now. Please try again later.
He likes that there are not only recipes, but underlying reasons. The book provides insight into how R is intended to work. This is the difference between understanding the basic concept of cut-and-paste as opposed to knowing just the steps for doing it in one operating system.
He also likes that the explanations provide gobs of useful search terms. These are great for solving challenges not contained in the recipes.
Must be a good book. He no longer grouses about how "easy things used to be with SAS," and tends to build complex charts with R now, instead of Libreoffice.
The reason for missing a star:
After 3 chapters, I notice that there are a lot of similarities among of the plots. It would be immensely helpful if the author added a brief introductions on ggplot: the philosophy of the developers and the common features of different geoms. To me, it works like a photoshop, things work in layers and the order of layers affect the output. An overview of ggplot is helpful is because before you plot anything, it is a good idea to have a holistic picture in mind what layers I would be needing and which is the best way to organize the layers. Recipes are easy for instant hands-on, but to figure out the principles based on discrete recipes is a demanding job for average users.
Updated: in the end of the book, there is appendix A, which explains the philosophy of ggplot. -This is exactly what I wanted. I realized this after finishing the first 6 chapter. It really helps.
That said, there are a few quibbles I should point out.
- The code is largely pretty good, but not always the most graceful. For example, the author appears not to have known about the bquote() function, and at one point he uses a very tortuous technique to solve a problem that bquote() would have handled with simplicity and grace. There are other places where I would have done things differently, but chacun à son goût, I suppose.
- This is really a book about ggplot2 and the hadleyverse, which is a dynamic place at the very least. The chapter on data manipulation with plyr and reshape2 should probably be replaced by one on dplyr and tidyr, which are now the preferred tools (partly for simplicity, partly for efficiency and partly for generality). The author can hardly be blamed for this, but the next edition, if there is one, should probably look fairly different in this part, at least
- Lattice is largly absent, which is a shame, and low-level methods with grid itself, which would have been useful in some places, is not mentioned.
I recommend this book, but to be most useful it should be taken along with Paul Murrell's more in-depth book, R Graphics (2nd Ed).
Visualizing quantitative information is essential for data analysis. It helps both to find patterns and to communicate them. I believe that in the R language there is now consensus about the fact that ggplot2 is the best package. If you manage to go beyond the learning curve, the package just implement the beauty for you.
This books teach you how to proceed. It has many examples and recipes. It's by reading someone else's code that you learn to do it yourself and Chang's book has dozens of recipes for each kind of graph. The final chapter on manipulation of data to prepare it for ggplot is particularly useful.
If I had to name only one thing I missed is perhaps a chapter on model visualization. It goes light on Cleveland plots and other techniques for visualizing regression results, but again, the book is overall the best reference I've found on doing graphs in R.
All of the examples in the book are based on ggplot2 library - if you've been using the built-in graphing tools until now, check out the appendix first, the switch is definitely worth it. Conveniently, the examples are short and to the point, explain all of the options, and rely on built-in datasets to enable easy experimentation. Next time you need a custom X, just open up the appropriate section, review the options, and you'll be up and running in no time.
This book is an excellent reference, and one I'll be keeping close to me. Having said that, it's also much more than that. Part of the value of this book is also showing what's possible with R and ggplot2 - answer: a lot! If you're serious about R, then this is definitely a book worth picking up.