Time

Due by 11:59 PM on Monday, December 2, 2024

For this exercise, you’ll visualize something over time. You can use whatever data you want. Use a dataset from a past exercise, use one of the built-in datasets like gapminder from the {gapminder} package, download stuff from the World Bank with the {WDI} package, or download stuff from FRED using the {tidyquant} package. Anything is fair game.

There’s no specific way you should visualize time. Show it as a line, or as bars, or with a heatmap, or with ridgeplots, or with whatever is most appropriate for the story you’re telling. You’re free to do whatever you want!

This can be as simple or as complex as you want. You don’t need to make your plot super fancy, but if you’re feeling brave, experiment with changing colors or modifying themes and theme elements.

This example page will be incredibly useful for you:

You’ll be doing all your R work in Quarto. You can download a zipped file of a pre-made project here:

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

Instructions

  1. If you’re using R on your own computer, download this file, unzip it, and double click on the file named exercise-13.Rproj: 13-exercise.zip

    (Alternatively, you can open the project named “Exercise 11” on Posit.cloud and complete the assignment in your browser without needing to install anything. This link should take you to the project—if it doesn’t, log in and look for the project named “Exercise 13”.)

  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.

    Fill out code in the empty chunks provided (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!).

    You’ll need to insert 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.

    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.

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