44  Our World in Data Highlighting Excess Mortality

Readings

Chapter 11 Communication: R for Data Science (2nd ed)

Creating custom, stylized ggplot2 themes can get complicated very quickly. Finding answers and examples on Google is easier if you know what key words to search for. These reference sheets/pages helpful as you learn the ggplot lingo..

Guided Instruction

Visualization for Presentation

The Our World in Data website publishes research and graphics that provide insight into world data. We are going to recreate one of their charts and use it to practice our annotation skills.

If the thing you want to edit is not a theme element, then it is related to data and can mostly likely be changed inside a geom_() or a scale_() layer.

  1. Recreate this graph as closely as you can. This will/should take the bulk of your time.
    • The data is provided on the download tab.
    • Focus your energy on the y-axis, axes, legend, lines, scales, etc. Pay attention to detail.
    • Do NOT worry about making your graph interactive. Ignore that aspect completely
    • To convert characters to dates you can use lubridate::mdy(). You can reorder the letters ‘m’, ‘d’, and ‘y’ in the code to match the order that the month, day and year are presented in the character string.
    • If you are getting stuck matching the graph exactly, try completing steps 2 and 3, then coming back to this step with the time you have left.
  2. Suppose we wanted to highlight (draw attention to) any points that are above 100%. Create two more graphs that show two different ways to highlight these points.
  3. Make one more graph that adds a line for the United States. Try highlighting the United States line using what you learned from the textbook.
  4. Write a paragraph summarizing insights you gained, or new skills/commands you learned in this task. Also reflect on how you can use “highlighting” to help the data tell a story.
  5. Render the .qmd file. Push all files created as part of the render to your GitHub repository.

Submit

In I-learn submit a link to the .md file on GitHub.