Quarto & Plotting

Due: Sep 18 by 11:59pm

Weight: This assignment is worth 2.5% of your final grade.

Purpose: The purpose of this assignment is to get familiar with creating plots using the ggplot2 library and to introduce you to the “Quarto” file format.

Submit: Commit and push your completed assignment to your course GitHub repository (see the “Submit” section at the end of this assignment).

Assessment: This assignment is graded using a check system:

  • ✔+ (110%): Responses shows phenomenal thought and engagement with the course content. I will not assign these often.
  • ✔ (100%): Responses are thoughtful, well-written, and show engagement with the course content. This is the expected level of performance.
  • ✔− (50%): Responses are hastily composed, too short, and/or only cursorily engages with the course content. This grade signals that you need to improve next time. I will hopefully not assign these often.

Notice that this is essentially a pass/fail system. I’m not grading your writing ability and I’m not counting the number of words you write - I’m looking for thoughtful engagement. One or two sentences is not enough. Write at least a paragraph and show me that you did the readings assigned.

1. Get Organized

Open your course repo (madd-f26/madd-netID) in Positron using File > Open Folder… - open the folder itself, not a file inside it. If you haven’t cloned your course repo yet, follow the steps in HW1 first.

Everything for this assignment lives in the hw3 folder. Open the hw3.qmd file inside it - that’s the only file you need to edit. Take notes and write example code under the “Begin notes here” heading as you go through the readings and exercises below, then write your reflection under the “Reflection” heading at the end.

Notice that this week’s file is a .qmd file, which is called a “Quarto Markdown” file (or just “Quarto” file). You’ll learn about what these files are and how they are different from .R files in the readings for this week. From now on, we’ll mostly be using Quarto files for our assignments (including your project deliverables).

2. Readings

Open up a notebook (physical, digital…whatever you take notes in best), and take notes while you go through these readings:

  1. Lesson 5 “Data Visualization”
  2. Lesson 6 “Reproducible Reporting”

3. Exercises

We’re going to again look at the Posit “recipes” page for examples on how to implement things in . This time, focus on the “Visualize Data” section - go through each recipe and try to implement it yourself in your hw3.qmd file. We’ll spend time in class next week going over ggplot and doing more practice with it.

4. Review

Last week you read about working with data in R using the tidyverse and the dplyr package (handing data using pipes, %>%, etc.). We also discussed this in class.

It is very important that you feel comfortable working with data frames using this approach as we will use it throughout the semester.

For extra practice, take a look at this assignment from my Intro to Programming in R class that I taught in the spring semester. I strongly encourage you to look through it and try to answer the questions, especially if this is your first time using the tidyverse and / or R. It is just good practice to review these skills.

5. Reflect

Reflect on what you’ve learned while going through these readings and exercises. Is there anything that jumped out at you? Anything you found particularly interesting or confusing? Write at least a paragraph in your hw3.qmd file, and include at least one question. The teaching team will review the questions we get and will try to answer them either in Slack or in class.

If you’re unsure where to start with a reflection, try filling out this template:

“I used to think ______, now I think ______ 🤔”

6. Submit

To submit your assignment, follow these instructions:

  1. Render your .qmd file by either clicking the “Preview” button in Positron or running quarto render in the terminal.
  2. Open the rendered html file and make sure it looks good! Is all the formatting as you expected?
  3. Commit and push your work using GitHub Desktop: look at the diff, write a short commit message, click Commit, then Push.
NoteRemember

Your work isn’t submitted until you’ve pushed it. Committing only saves the change on your own computer – go look at your repo on GitHub.com and confirm your work is actually there before you call this done.