Time

Due by 11:59 PM on Monday, December 1, 2025

The United States National Oceanic and Atmospheric Administration (NOAA) runs the Mauna Loa Observatory (MLO) in Hawai’i, which has taken regular daily measurements of atmospheric parameters since 1958, including levels of carbon dioxide (CO2) emissions, measured in parts per million (ppm). In 1958, CO2 levels averaged around 320 ppm; in 2025, they averaged 425 ppm—a 33% increase in emissions.

In this exercise, you’ll use data from the Mauna Loa Observatory to track annual and seasonal trends in CO2 over time. I’ve provided you with three datasets that use different measurement frequencies.1

As always, if you’re struggling, please use Discord and talk to me and your classmates! Don’t suffer in silence!

ImportantCheck the example!

The example page for this week will be helpful!

Instructions

  1. Open the project either on your computer or in Posit.cloud

    • 13-exercise.zip: If you’re using R on your own computer, download this file, unzip it, and double click on the file named 13-exercise.Rproj
    • Posit.cloud project: Use this link if you’re using Posit.cloud in your browser
  2. Rename the Quarto file named your-name_exercise-13.qmd to something that matches your name and open it in RStudio.

  3. Complete the tasks given in the Quarto file. You can definitely copy, paste, and adapt from other code in the document or the example page—don’t try to write everything from scratch!

  4. When you’re all done, click on the “Render” button at the top of the editing window and create a Typst (pdf), PDF, or Word version of your document. Upload that file to iCollege. Do not upload a rendered HTML file (they don’t work on iCollege).

Tips

TipRunning chunks

Remember that you can run an entire chunk by clicking on the green play arrow in the top right corner of the chunk. You can also run lines of code line-by-line if you place your cursor on some R code and press + enter (for macOS users) or ctrl + enter (for Windows users).

Make sure you run each chunk sequentially. If you run a chunk in the middle of the document without running previous ones, it might not work, since previous chunks might do things that later chunks depend on.

TipInserting chunks

You’ll need to insert some of your own code chunks. Rather than typing them by hand (that’s tedious!), use the “Insert” button at the top of the editing window, or press + + I on macOS, or ctrl + alt + I on Windows.

Footnotes

  1. If you’re interested, you can see the full data cleaning code here. The data is already pretty well structured and clean—all I really do is rename some columns and create some columns for dates.↩︎