Final Exam - Paris Paintings

In this assignment we explore some more of the painting auction data from the linear models lecture.

Work independently and ask only the instructor if you have questions. You can use all static resources (lectures, classwork, the internet) to complete the assignment except getting help from another person.

Getting started

Go to the course GitHub organization and locate your final exam repo, clone it in RStudio and open the R Markdown document. Knit the document to make sure it compiles without errors.

Warm up

Before we introduce the data, let’s warm up with some simple exercises. Update the YAML of your R Markdown file with your information, knit, commit, and push your changes. Make sure to commit with a meaningful commit message. Then, go to your repo on GitHub and confirm that your changes are visible in your Rmd and md files. If anything is missing, commit and push again.

Packages

We’ll use the tidyverse package for much of the data wrangling and visualization. You can load them by running the following in your Console:

library(tidyverse)

Data

The data can be found in the data folder of the assignment repo, and it’s called paris-paintings.csv.

Exercises

  1. Load the data file from the csv file into a data frame in R. Report the number of variables and the number of paintings using inline code and a complete sentence in your R markdown document.

  2. Create a new variable with three levels; the new paint_type variable such that it has three levels: landscape, portrait, and other. A painting is a portrait if it has 1 for the variable portrait. A painting is a landscape if it’s not a portrait and it has any landscape (the landsALL variable equals 1). Otherwise, the painting is an other type painting. Then, re-order the levels in the following order: landscape, portrait, and other. Count the number of each type of painting.

  3. Does there appear to be a relationship between the year and log(price)? Make a plot that shows that relationship with different colors for the three types in the paint_type variable. (You do not need any lines.) Make sure that the plot is well done and labeled. Describe the relationship in a sentence.

  4. Find the median price for paintings sold at auction, per year. Repeat this, but get values for the three types in the paint_type variable. Discuss your findings.

🧶 ✅ ⬆️ Knit, commit, and push your changes to GitHub with an appropriate commit message. Make sure to commit and push all changed files so that your Git pane is cleared up afterwards and review the md document on GitHub to make sure you’re happy with the final state of your work.

Rubric

30 points