Chapter 10 Class assignment 2

We’ll now spend the rest of class on a class assignment, with the aim of getting to know more about R markdown, learning to visualise distributions, creating and using themes, and changing titles and text. To learn more about R markdown, click here, here, and here. For information on themes click here. For changing titles and text, more information can be found here. You can make use of this Rmarkdown file to do the assignment.

  1. Load data set
data <- read.csv("https://stulp.gmw.rug.nl/dataviz/temp_NL.csv", 
                 header = TRUE)

This dataset source describes the temperature in degrees Celsius in the Netherlands for each month from 1901 to 2018.

  1. Get a quick overview of the dataset by running:
head(data) # print first couple of rows of dataset
##   Year   Month Temperature
## 1 2018 January         5.6
## 2 2017 January         1.6
## 3 2016 January         4.8
## 4 2015 January         4.0
## 5 2014 January         5.7
## 6 2013 January         2.0
summary(data)
##       Year         Month            Temperature   
##  Min.   :1901   Length:1416        Min.   :-6.70  
##  1st Qu.:1930   Class :character   1st Qu.: 4.80  
##  Median :1960   Mode  :character   Median : 9.40  
##  Mean   :1960                      Mean   : 9.54  
##  3rd Qu.:1989                      3rd Qu.:14.70  
##  Max.   :2018                      Max.   :22.30
  1. Compare the distributions of measured temperature for all months

  2. Reorder the x-axis sensibly which is currently in alphabetical order.

  3. Read the section on Titles, text and legends, and change the axes-labels, add a title, and add a caption.

  4. Change the characteristics of text differently for the axes-labels, title, and caption.

  5. Read the section on themes, and pick a theme you like or better yet, make your own theme and add the theme to your plot.

  6. Combine everything together to create a nice graph.