knitr::opts_chunk$set(warning = FALSE, message = FALSE)
library(palmerpenguins)
library(ggplot2)
library(viridis)
library(dplyr)
library(plotly)
library(scales)
data("penguins")

Example Graphs

Fig. 1

e1<- ggplot(penguins, aes(x = island, fill=species)) +
  geom_bar(show.legend = FALSE) + 
  labs(title = "Three Species of Penguin Live on Three Islands", x= "Island", y = "Count") + 
  scale_fill_viridis(discrete = TRUE)+
  theme_minimal()
ggplotly(e1)

Gentoo and Chinstrap Penguins each live on one Island. Adelie Penguins Live on All Three.

Fig. 2

e2 <- ggplot(data = penguins, aes(x = body_mass_g, y = flipper_length_mm, color = species))+
  geom_jitter()+
  labs(title = "Gentoo Penguins are Heaviest and have the Longest Flippers",
       x = "Body Mass (g)",
       y = "Flipper Length (mm)",
       color = "Species") +
  theme_minimal() +
  scale_color_viridis(discrete=TRUE)
ggplotly(e2)

Adelie Penguins and Chinstrap penguins are similar in body mass and flipper length. Gentoo penguins are proportional, but much larger (and longer)

Adherence to Data Visualization Checklist

Text

Titles are short and to-the-point. Subtitles beneath each graph provide additional interpretation. Text size is hierarchical and readable. I was unable to label the colors on the graph directly, but the legend is nearby. The graphs are interactive, so this information is also available by moving the cursor over the graph.

Arrangement

Proportions are accurate and the data is logically ordered (alphabetically in Fig. 1 and smallest to largest value in Fig. 2). The spaces between values on the axes are equidistant. The graph is two-dimensional and free from decoration. My only frustration is that a transparent overlay from the web app that makes these graphs interactive is partially visible over the title of the graph.

Color

The Viridis color palette used here is legible when printed in black and white and for people with colorblindness. In both graphs, color is used to add information about the species of penguin.

Lines

Gridlines are present but muted using a minimalist theme. There is no border line on either graph and there are no unnecessary marks on the axes. There is one x and one y axis.

Overall

The first graph shows that only one type of penguin lives on all three islands studied. This is not the most surprising conclusion, but it is interesting to know. The second graph compares and contrasts the size of penguins, and shows that even though one type of penguin is larger than the others, they are all essentially proportional in terms of mass-to-flipper-length ratio. The bar graph and scatter plot are appropriate to the data they show. The charts are clean, with an appropriate amount of precision (and more precise data available through the interactive features).