R Graphics Cookbook: Practical Recipes for Visualizing Data 1st Edition
Use the Amazon App to scan ISBNs and compare prices.
There is a newer edition of this item:
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.
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.
- Publisher : O'Reilly Media; 1st edition (January 22, 2013)
- Language : English
- Paperback : 416 pages
- ISBN-10 : 1449316956
- ISBN-13 : 978-1449316952
- Item Weight : 1.45 pounds
- Dimensions : 7 x 0.9 x 9.19 inches
- Best Sellers Rank: #732,688 in Books (See Top 100 in Books)
- Customer Reviews:
Reviews with images
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
I spent a solid year learning and exploring R as a graduate student before I cracked open Winston Chang's R Graphics Cookbook and started learning ggplot2's little oddities. ggplot2 is itself almost like another language within R, but it's thankfully a very simple language -- far more simple and far more flexible, I feel, than the built-in graphics options.
Since you'll be printing your graphics step by step -- your boundaries before your lines; your lines separately from points; etc. -- it's easy to keep track of where every impact on the output image is occurring, allowing you to easily tweak the code and get immediate results. E.g., if annotations are not lining up where you want, or font size needs to be reduced.
Chang's cookbook is separated by what feature you need to either edit or create, making it easy to jump to what the reader needs. Full sections are devoted to bar graphs, line graphs, scatter plots, data distribution graphics, customizing annotations, axes, legends, color options, and cetera. Nearly 400 pages of text and images showing different ways of customizing and displaying every piece of your graphics. It's not a book you read cover to cover -- just the resource that 'cookbook' implies, meeting the reader's specific needs.
If you want to just jump into the code and see what you can do with your own data, there's no better place to start. Almost no time is devoted to unnecessary exercises or teaching you the fundamentals of the R programming language. Exploring the far reaches of the Internet is a free alternative that's likely just as helpful, but Chang's book serves as a great reference, and contains almost everything you need all in one.
This book walks you through the essentials of graphing in R: base graphics and ggplot2 as well as a bit about lattice. In addition there is a section on formatting your data which isn't bad for starters. If you use the R help menus in conjunction with the book then most of the time you will do OK.
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.
Top reviews from other countries
I found the 'ggplot2: Elegant Graphics for Data Analysis' (one of the other ggplot2 books available) a bit of struggle and bought this book with a view to using as a 'helper'. After using it for a couple of months I can say that it's everything I initially needed: easy to read, simple to understand and the recipes work without any problem. It's moved from being an initial prop for 'ggpplot2...' to being my main reference - though I do still use the original book as well.
The book is never more than arms reach away when I have to produce graphic reports and is full of 'page-marker' tabs for commands, colour tables, key examples...
Extremely useful and can't recommend it highly enough...
Geht es denn ich dem Buch nur um ggplot2? Nein, da ist einiges zu lesen über base graphics, da werden Mosaic plots mit vcd und Kuchendiagramme mit base graphics gemacht, aber der Schwerpunkt liegt ganz klar im Bereich ggplot2.
Das Buch kann man auch kostenlos online lesen und es sogar als PDF herunterladen. Es ist gut. Darum habe ich es gekauft. Einmal, weil ich gerne zwischendurch schnell zu einem Buch greife, dann weil ich auf der Suche nach der richtigen Grafik gerne mit den Fingern die Seiten durchrauschen lasse und nicht zuletzt, weil die Kombination aus kostenlosem und käuflichem Buch eine unbedingt unterstützenswerte Idee ist und wer das auch findet und das Geld hat, der sollte das die Verlage auch in Form von Einkünften wissen lasssen. Zumal das Buch einen sehr moderaten Preis hat.
Manchmal schreibe ich ans Ende einer Rezension Kaufempfehlung! In diesem Fall rate ich, in die kostenlose online-Version zu schauen und sich dann selbst zu entscheiden. Ich würde es wieder kaufen.