Assignment 6: Reduce Attributes

Author

Brian J. Smith

Published

March 26, 2026

Description

This assignment is to gain practice creating reducing the attributes (columns) of a dataset for clearer plotting. It is due April 2.

Document Setup

For this assignment, create an HTML document using Quarto. You can refer to the homepage.qmd document we created in class for some ideas.

  • Make sure your YAML header has:
    • The option embed-resources: true
      • This goes under the html: format option.
      • It will make sure the HTML file stands alone, rather than referring to an external figure. I won’t be able to see your figure if you upload and HTML file without this option.
  • I want to see the code chunks that create your figure, so make sure you use #| echo: true in your R code chunk.
    • You may use code folding (#| code-fold: true) if you’d like.

Instructions

  1. Find a dataset. It should have at least three variables of interest, and the goal is to reduce that down to two variables1.
  2. Write a small amount of narrative in your Quarto document about the dataset and why you want to make a particular visualization. Don’t spend a lot of time on the narrative.
  3. Reduce the number of attributes of the dataset. You can do this by simple transformations of the data (like the BMI example combining height and mass). You can also do this with a dimension reduction method (e.g., PCA, (N)MDS, etc.).
  4. Plot!
  1. Plot the original data with all the attributes. This will probably require multiple panels to show > 2 dimensions.
  2. Plot the new data with the reduced attributes. This should be a single panel.

Let me know if you have any questions!

Footnotes

  1. If you’d like to reduce from >3 attributes to 3 (e.g., to plot them with x, y, color), that’s fine, too.↩︎