Book Image

R Data Visualization Cookbook

By : Gohil
Book Image

R Data Visualization Cookbook

By: Gohil

Overview of this book

If you are a data journalist, academician, student or freelance designer who wants to learn about data visualization, this book is for you. Basic knowledge of R programming is expected.
Table of Contents (12 chapters)
11
Index

Generating a simple pie chart

Even after being criticized by many statisticians as a means to deliver information or present data, pie charts have been used widely by companies in their annual reports or by businessmen for presentation purposes. According to Schwabish (2014), Pie charts force the readers to make comparisons using the area of the slices or the angles formed by the slices—something our visual perception does not accurately support; they are not an effective way to communicate results.

One way to overcome this criticism is by sorting our data from the highest to the lowest and displaying percentages. The New York Times visualizations implement pie charts to represent data, but the pie charts are also accompanied by bar charts and area charts to provide additional context to the data. The following pie chart shows data on brain injury across different branches of the military:

Generating a simple pie chart

How to do it…

The data used for creating the pie chart was extracted from http://fas.org...