Week 3 practice

Visualisations

In Week 3 Workshop we are focusing on visualisations.

We can visualise for exploration or for communication. Here is an example using some of the extra features in ggplot2 to produce a plot that is well annotated with a meaningful title, labels, a legend, and a clean theme. It uses the built-in dataset mtcars.

Feel free to play around with the plot. I have left an empty code chunk here for you to inspect aspects of the mtcars dataset (e.g. using glimpse, head, str etc) to help you.

Here is another way of looking at the data.

Have a think what each of the plots are telling you, and the relative advantages of different plotting types. You can try others types as well. The code will reset when you refresh the website.

Use the ggplot cheatsheet can help: https://posit.co/wp-content/uploads/2022/10/data-visualization-1.pdf