HW 05: Paint a plot, pick a package

due Friday April 15 11:59 PM

This homework was adapted from an assignment originally developed by Prof. Mine Çentinkaya-Rundel, (see here for the original).

Learning goals

In this homework assignment you will…

Getting started

Exercise 1:

For this exercise we will use the tidyverse and palmerpenguins R packages. You can add any other packages as needed.

We will use the penguins data set in the palmerpenguins R package for this exercise. We will plot the bill length versus the flipper length.

penguins %>%
ggplot(aes(x = flipper_length_mm, y = bill_length_mm, color = species)) + 
  geom_point()

Exercise 2:

Depending on where the package comes from, how you install the package differs:

Sample list of packages on CRAN:

package name description
ape Manipulate, plot and interact with phylogenetic trees and models. Comes with sample data
astrodatR Astronomy datasets
cowsay Allows printing of character strings as messages/warnings/etc. with ASCII animals, including cats, cows, frogs, chickens, ghosts, and more
babynames US Baby Names 1880-2015
dragracer These are data sets for the hit TV show, RuPaul’s Drag Race. Data right now include episode-level data, contestant-level data, and episode-contestant-level data
datapasta RStudio addins and R functions that make copy-pasting vectors and tables to text painless
DiagrammeR Graph/Network Visualization
janeaustenr Full texts for Jane Austen’s 6 completed novels, ready for text analysis. These novels are “Sense and Sensibility”, “Pride and Prejudice”, “Mansfield Park”, “Emma”, “Northanger Abbey”, and “Persuasion”
ggimage Supports image files and graphic objects to be visualized in ‘ggplot2’ graphic system
gganimate Create easy animations with ggplot2
gt Easily Create Presentation-Ready Display Tables
leaflet Create Interactive Web Maps with the JavaScript ‘Leaflet’ Library
praise Build friendly R packages that praise their users if they have done something good, or they just need it to feel better
plotly Create interactive web graphics from ggplot2 graphs and/or a custom interface to the JavaScript library plotly.js inspired by the grammar of graphics
suncalc R interface to suncalc.js library, part of the SunCalc.net project, for calculating sun position, sunlight phases (times for sunrise, sunset, dusk, etc.), moon position and lunar phase for the given location and time
schrute The complete scripts from the American version of the Office television show in tibble format
statebins The cartogram heatmaps generated by the included methods are an alternative to choropleth maps for the United States and are based on work by the Washington Post graphics department in their report on “The states most threatened by trade”
ttbbeer An R data package of beer statistics from U.S. Department of the Treasury, Alcohol and Tobacco Tax and Trade Bureau (TTB)
ttbbeer An R data package of beer statistics from U.S. Department of the Treasury, Alcohol and Tobacco Tax and Trade Bureau (TTB)
ukbabynames Full listing of UK baby names occurring more than three times per year between 1996 and 2015, and rankings of baby name popularity by decade from 1904 to 1994
wesanderson Color palettes from Wes Anderson films
scatterplot3d Create 3D plots

Submission

Knit to PDF to create a PDF document. Stage and commit all remaining changes, and push your work to GitHub. Make sure all files are updated on your GitHub repo.

Only upload your PDF document to Gradescope. Before you submit the uploaded document, link each answer to the appropriate page(s). If any answer spans multiple pages, then mark all pages. Associate the “Overall” section with the first page.

Grading (50 points)

Component Points
Ex 1 19
Ex 2 25
Workflow & formatting 6