For these exercises, we will be using the vaccines data in the dslabs package:

library(dslabs)
data(us_contagious_diseases)

1. Pie charts are appropriate:

  1. When we want to display percentages.
  2. When ggplot2 is not available.
  3. When I am in a bakery.
  4. Never. Barplots and tables are always better.

Store your answer in q1.

2. What is the problem with the plot below:

  1. The values are wrong. The final vote was 306 to 232.
  2. The axis does not start at 0. Judging by the length, it appears Trump received 3 times as many votes when, in fact, it was about 30% more.
  3. The colors should be the same.
  4. Percentages should be shown as a pie chart.

Store your answer in q2.