Instructions

In this week’s lab, the main goal is to learn how to define and make effective plots to answer questions about data. On the due date, turn in your Rmd file and the html product.

Exercise 1

Open your project for this class. Make sure all your work is done relative to this project.

Open the lab4.Rmd file provided with the instructions. You can edit this file and add your answers to questions in this document.

Exercise 2

In each of these plots from previous labs, write out the grammar that defines the mapping of the data to the display:

Exercise 3

For the hotel booking data, file budapest.csv make a plot to answer this question: “How far ahead of the check-in date do people typically search for a hotel room?”, and write a sentence or two answering it. In the last lab you did the wrangling necessary to get the data into shape. You may also need to do a bit more cleaning to remove very strange differences like those less than 0, and more than a year ahead searches. (EXTRA CREDIT POINT: Explain how these odd values arose.)

Exercise 4

For the 2015 PISA results, design plots to answer these questions, explain your reasons for the design, and write an answer to the question.

  1. How do science scores differ by school type?
  2. Do math scores differ by birth month?
  3. What is the relationship between number of TVs in the household and number of cars?
  4. Is amount of internet use associated with amount of time spent studying out of hours?
  5. How does a sense of belonging affect science scores?

Exercise 5

In this part, we are going to take a look at historical weather for Melbourne. Download the latest data for the Melbourne airport station, ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/daily/all/ASN00086282.dly. You may need to use Google Chrome. Using the same wrangling code from the previous lab, get the data in shape, and make plots to answer these questions:

  1. What is the long term temporal trend for the maximum temperature?
  2. What is the seasonal pattern of maximum temperature, and how varied is this over the years?
  3. Is Melbourne getting drier?
  4. How did the spread from minimum to maximum for June this year compare with the historical trend in spread over the preceding years?