--- title: "Module 2, Assignment 3: Final Project Kickoff" author: "Ellen Bledsoe, Lily McMullen" format: html execute: eval: false --- ```{r} #| include: false knitr::opts_chunk$set(echo = TRUE) ``` # 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](https://www.bas.ac.uk/project/krillbase/#about) - [Fur Seal Pups](https://ramadda.data.bas.ac.uk/repository/entry/show?entryid=bc6d802a-fce5-495d-b5e1-bb26f824847c) at Maiviken - [Gentoo Penguins](https://ramadda.data.bas.ac.uk/repository/entry/show?entryid=1fd5bc8a-96b5-4f53-aa15-33e5330e7705) on Bird Island - [Chinstrap Penguins](https://ramadda.data.bas.ac.uk/repository/entry/show?entryid=d784af69-c92b-444c-a12e-ee0361802cb1) 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. ```{r} # 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` ```{r} ``` 1. Use a function (e.g., `head()` or `str()`) to look at the data in each data frame. ```{r} ``` ## Choose Your Dataset 2. 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 3. 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. 4. First, determine which variable is the *dependent* variable in your dataset. Remember, it must be *numeric*. *Answer*: 5. 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*: 6. 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. 7. 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 ```{r} ``` ## Plot the Data ------------------------------------------------------------------------ ### Important Instructions and Info! (a) 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. (b) 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`. (c) 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. (d) Because you are choosing your own variables, there is no answer key for this assignment. (e) 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? 8. 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) ```{r} #| warning: false ``` *Answer:* 9. 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) ```{r} #| warning: false ``` *Answer:* 10. 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) ```{r} #| warning: false ``` *Answer:* 11. Create a scatter plot. Write 1-2 sentences describing what information you can gather from the plot. (2 points for plot, 1 for description) ```{r} #| warning: false ``` *Answer:* ------------------------------------------------------------------------ 12. 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.