Data In The Wild
  1. Module 2
  2. Assignment 3
  • Home
  • Contact Us
  • For Instructors

  • Module 1
    • Overview
    • 1.1: Introduction to R and RStudio
    • 1.2: Intro to Coding in R
    • 1.3: Introduction to the tidyverse
    • Assignment 2
    • Assignment 3
  • Module 2
    • Overview
    • 2.1: Good Food Gone Bad
    • 2.2: Plotting with ggplot2
    • 2.3: Data Visualization
    • 2.4: Exploring geom Functions
    • 2.5: Module 2 Wrap-Up
    • Assignment 1
    • Assignment 2
    • Assignment 3
  • Module 3
    • Overview
    • 3.1: Leopard Seals
    • 3.2: T-Tests
    • 3.3: Comparing (Multiple) Means
    • Assignment 1
    • Assignment 2
  • Module 4
    • Overview
    • 4.1: Combining Datasets (Joins & Binds)
    • 4.2: K-Nearest Neighbor
    • 4.3: Roads and Regressions
    • 4.4: Multiple Regression
    • 4.5: Writing Functions
    • Assignment 1
    • Assignment 2
    • Assignment 3
    • Assignment 4
  • Module 5
    • Overview
    • 5.1: Population Growth
    • 5.2: Sustainable Fishing
    • 5.3: Comparing Populations
    • Assignment 1
    • Assignment 2
    • Assignment 3
  • Final Project

  • Resources

On this page

  • Assignment Description
    • Purpose
    • Task
    • Criteria for Success
  • Assignment Questions
    • Explore Datasets
    • Choose Your Dataset
      • Modifications
    • Writing a Research Question
    • Summarize the Data
    • Plot the Data
      • Important Instructions and Info!
  • Turning in Your Assignment
  1. Module 2
  2. Assignment 3

Module 2, Assignment 3: Final Project Kickoff

Author

Ellen Bledsoe, Lily McMullen

Assignment Description

Purpose

The goal of this assignment is to get started working on the final project for the course.

Task

Choose a dataset to work with for the final, write a research question, summarize and plot the data.

Criteria for Success

  • Code is within the provided code chunks
  • Code chunks run without errors
  • Code produces the correct result
    • Code that produces the correct answer will receive full credit
    • Code attempts with logical direction will receive partial credit
  • Written answers address the questions in sufficient detail

Assignment Questions

All questions are worth 1 point unless otherwise specified.

Explore Datasets

Click on the links for each dataset and read a little bit about each one.

  • KrillBase
  • Fur Seal Pups at Maiviken
  • Gentoo Penguins on Bird Island
  • Chinstrap Penguins on Signy Island

Now that you have an idea of what each data set is about, let’s explore the actual data.

First, we need to load the tidyverse package.

# load the tidyverse

Read all four datasets (.csv files) into RStudio using the read_csv() function (not read.csv). Remember to save each dataset as an object with a descriptive name. The four files are:

  • krill.csv
  • fur_seals.csv
  • gentoos_and_temps.csv
  • chinstraps_on_signy.csv
  1. Use a function (e.g., head() or str()) to look at the data in each data frame.

Choose Your Dataset

  1. Now that you’ve explored the datasets, decide which one you would like to focus on for the final project. Below, tell us which one and why you find it interesting.

Answer:

Modifications

Find your dataset below.

We’ve made a few modifications to each of the datasets to make them a bit more manageable to work with. Based on how some of these variables will be used in future assignments, you should treat certain variables in the way listed below (even if they could be considered either numeric or categorical).

Krill

  • You will want to use the Krill_per_1m2_log column as your dependent variable. This is a log-transformed version of the Krill_per_1m2 column. You don’t need to worry about why we transformed the data, but this column should be a bit easier to work with.
  • The Date, Year, and Month columns should all be treated as numeric variables.
  • While the Station column can technically be considered a qualitative/categorical variable, please use the Day_Night column as your qualitative/categorical variable for this assignment and for your research question.

Fur Seals

  • If you choose to use the Date or Year column, treat them as numeric variables.
  • On the other hand, if you use the Month column, treat it as a categorical variable.

Gentoo Penguins

  • If you are using the Year column, treat it as a numeric variable.
  • The dataset has a column for the previous year’s December temperature. Because counts of chicks took place in January or February (and nests were counted in October/November), the number of chicks is most likely to be related to the temperatures directly after chicks hatched (December of the previous year).

Chinstrap Penguins

  • We do not recommend using the MONTH or DAY column.
  • If you use the YEAR column, treat it as a numeric variable.

Writing a Research Question

  1. For each of the columns in your dataset, identify whether they contain categorical or numeric data.

    NOTE! Some data, such as dates (month, year), can act as both types of data. See the section above for clarification about columns in your chosen dataset.

    Type out the name of the column and then the descriptor. For example:

    • island_name: categorical
    • island_size_km: numeric

Answer:

In order to write a successful research question, we need to identify our dependent variable and the independent variable that we think affects the dependent variable.

  1. First, determine which variable is the dependent variable in your dataset. Remember, it must be numeric.

Answer:

  1. Next, choose 1 independent variable from your dataset (each dataset has more than one from which to choose). This should be a variable that you believe might affect the values of the dependent variable. It can be either categorical OR numeric.

Answer:

  1. Now, let’s put those 2 variables into a research question (revisit the Aquaponics lesson for a reminder of how to write a research question).

Answer:

Summarize the Data

Let’s get to know our data a little better.

  1. Focus on your dependent variable. Calculate the minimum value (min()), maximum (max()) value, and average (mean()) value using the tidyverse functions (you might need na.rm = TRUE!).
  • If your research question has a categorical independent variable, use the group_by function to find the above values of your dependent variable for each category of the independent variable
  • If your research question has a numeric independent variable, calculate the minimum, maximum, and mean values for the independent variable in addition to the dependent variable

Plot the Data


Important Instructions and Info!

  1. You can use any variable from the dataset, not only the ones in your research question. In fact, you will need to use different variables to successfully create all of the plots.

  2. For all of the plots below, be sure to add:

    • improved labels for the x-axis, y-axis, and the legend (if present)
    • one of the following themes to your code: theme_bw, theme_classic, or theme_light.
  3. For each question, you get to choose the variables you use for each plot! Pay attention to which variables are numeric vs. categorical and where they should go in the code to produce the correct type of plot.

  4. Because you are choosing your own variables, there is no answer key for this assignment.

  5. Each plot is worth 2 points. Your interpretation is worth 1 point. Some of your plots may be hard to interpret. That’s ok! In that case, explain why the plot is challenging to interpret.


STOP! Did you read the “Important Instructions and Info” section above?

  1. Produce a histogram plot (just one, not multiple on the same plot).

    Write 1-2 sentences describing what information you can gather from the plot. (2 points for plot, 1 for description)

Answer:

  1. Create a multiple histogram plot. Make sure we can see each histogram plot (make sure one isn’t blocking another by modifying the transparency and position).

    Write 1-2 sentences describing what information you can gather from the plot. (2 points for plot, 1 for description)

Answer:

  1. Create a box-and-whisker plot. Changing the color of the boxes is optional. Make sure to add points to the plot.

    Write 1-2 sentences describing what information you can gather from the plot. (2 points for plot, 1 for description)

Answer:

  1. Create a scatter plot.

    Write 1-2 sentences describing what information you can gather from the plot. (2 points for plot, 1 for description)

Answer:


  1. Do any of the plots you made above match up with your research question?
  • If so, identify which plot and explain how you know it matches up correctly (based on numeric vs. categorical variables).
  • If not, explain which plot type would match your research question and how you know (based on numeric vs. categorical variables).

Answer:

Turning in Your Assignment

  1. Make sure your name is filled in at the top of the document.
  2. Click the Render button at the top of this document. This will produce an HTML file that opens in a new tab and also saves to the Files panel on the bottom-right of your screen.
  3. To download the HTML file from Posit Cloud, click the empty box to the left of it in the Files panel.
  4. Click the blue gear at the top of the Files panel and choose Export.
  5. Put your last name at the front of the file name when prompted, then click Download. The file is now in your Downloads folder.

2026, University of Arizona & Lewis & Clark College

 
  • Made with Quarto