R is a powerful system for creating data visualizations. In fact, R gives you so many options for creating charts that it can be hard to know the best way to communicate effectively. To help you present your data as effectively as possible using R, there's a new (and free) e-book available to download: Effective Graphs with Microsoft R Open. Written by the mother-daughter team of Naomi Robbins (author of Creating More Effective Graphs and Forbes contributor) and Joyce Robbins (sociologist and R programmer specializing in data visualization)
The book gives plenty of examples of common (and some not-so-common) data visualizations, with suggestions on how to customize them for the best effect. All of the R code for the charts in included in the book, and also available on GitHub for easy copy-pasting. The chart types discussed include:
- Charts for making comparisons: bar charts and dot charts
- Visualizations of distributions: histograms and box plots
- Charting trends over time: line charts and month plots
- Visualizing relationships: scatterplots, scatterplot matrices, and parallel coordinate plots
- Dividing a whole into parts: (multiple) pie charts, bar charts (simple, divided, grouped and faceted)
- Specialized charts: stacked bar charts (Likert scales) and linked micromaps (as shown below)
The examples were done using Microsoft R Open, but since it's 100% compatible with R the code works with any relatively recent R version.
Naomi and Joyce presented several examples from their e-book in a recent webinar (presented by Microsoft), and fielded lots of interesting questions from the audience. If you'd like to see the recorded webinar and also receive a copy of the slides and the e-book, follow the link below to register to receive the materials via email.
Microsoft Advanced Analytics and IoT: Creating Effective Graphs with Microsoft R Open
Anyone who suggests that there is ever an excuse for using pie charts does not know how to present data effectively. I strongly recommend folks stick with the Ed Tufte books over this paper, and if Naomi's other books are at this low a level, stay away from them as well.
Posted by: Carl Witthoft | May 12, 2016 at 11:26
Since it is 100% compatible with standard R, it feels like putting Microsoft R Open in the title is unnecessary and I think puts off or confuses your potential audience. The content of the book could certainly talk about Microsoft R as it's recommended R distribution.
Posted by: Mark Adamson | May 13, 2016 at 04:51
Carl, that's a very strong -- and unjustified -- statement to make about an author. If you had read section 6.1 of the e-book, you would have seen the statement about pie charts: "A bar chart or dot chart is a preferable way of displaying this type of data". Nonetheless, sometimes pie charts are a requirement (say, asked for specifically by a client), and if you have to make one, there is good advice in there for making them as useful as possible.
Posted by: David Smith | May 13, 2016 at 06:15
Yes, I'm familiar with the "clients require it" argument, and I just don't buy it. Then again, I can never remember whether it's "Answer a fool according to his folly" or "Answer NOT a fool according to his folly." :-) . Back to the book, "..is a preferable way.." doesn't really make a strong case. I did see the statement "One positive feature of pie charts, however, is that they clearly show that the sum of the wedges is 100%." If you have access to the wonderful poster from the RCA Engineer, circa 1981, which lists graph types, it makes the case more succinctly. Replace "One positive feature" with "The ONLY positive feature" .
Posted by: Carl Witthoft | May 13, 2016 at 06:29
Carl,
The ebook states, "If you design charts, you’re probably aware that the pie chart is quite controversial. The documentation for the pie() function in base graphics doesn’t pull any punches: 'Pie charts are a very bad way of displaying information.... A bar chart or dot chart is a preferable way of displaying this type of data.' We agree." We also present a version of a bar chart which we call a bar percent chart so that pie charts are not needed to show that the categories sum to 100%.
Creating More Effective Graphs goes into more detail on the limitations of pie charts and has a "not recommended" icon next to them.
My position on what to do if your boss or clients request bad charts is given in the September 2011 issue of Amstat News.
Where can I get a copy of the poster you refer to?
Posted by: Naomi B. Robbins | May 13, 2016 at 08:32
I've been searching without any success for a soft copy. I am going to dig up my paper copy and try to find a store w/ a poster-sized scanner. I'll send you a note if I am able to produce a pdf or jpg of the poster.
Posted by: Carl Witthoft | May 13, 2016 at 09:36
Naomi, I'd just like to express my thanks for this great resource that you and your daughter have published. I run a team of analysts for one of the Big 4, specialising in quantitative risk analysis, and your book, Creating More Effective Graphs, is compulsory reading for them. It's so easily accessible that they get it straight away; normally after weaning then off the horrors of Microsoft Excel charts. The other thing I insist is that they learn R, so this is the perfect companion. Best, Mike O'Connor, New Zealand.
Posted by: Michael O'Connor | May 14, 2016 at 22:36
David, I've not yet located a poster-size scanner, so I put up a photo of the poster. It's completely legible. See witthoft.com or the "TechnoStuff" photo album on my FB page for a copy.
Posted by: Carl Witthoft | May 15, 2016 at 09:38