+ - 0:00:00
Notes for current slide
Notes for next slide

R in 3 Months
Week 11
Advanced Data Viz Part 2

1 / 11

Agenda

2 / 11

Agenda

  1. Housekeeping
2 / 11

Agenda

  1. Housekeeping

  2. ggtext example

2 / 11

Agenda

  1. Housekeeping

  2. ggtext example

  3. Group work

2 / 11

Agenda

  1. Housekeeping

  2. ggtext example

  3. Group work

  4. Next week

2 / 11

Housekeeping

3 / 11

Remaining Schedule

5 / 11

Remaining Schedule

  • Week 12

    • Office hours

    • Live session (December 8th)

5 / 11

Remaining Schedule

  • Week 12

    • Office hours

    • Live session (December 8th)

  • Week 13

    • Office hours

    • Last Live session (December 15th)

5 / 11

Remaining Schedule

  • Week 12

    • Office hours

    • Live session (December 8th)

  • Week 13

    • Office hours

    • Last Live session (December 15th)

  • Assignments

    • Please submit before end of December
5 / 11

Example Data Viz with {ggtext}

6 / 11

Dumbbell charts and {ggtext}

Let's walk through building this beautiful chart from Stephanie Evergeen in {ggplot2}.

This is a dumbell chart that uses colour in the title in place of a legend. We can do this using {ggtext}

7 / 11

Doing even more with {ggtext}

Our colleague Cara Thompson ran an incredible workshop at NHS-R in November 2022 about levelling up your charts [with {ggtext}].


You can watch the video and view Cara's slides on her website.

8 / 11

Group work

9 / 11

Group work

10 / 11

Group work

Your task is decipher how I made this graph

10 / 11

Group work

Your task is decipher how I made this graph

  • Why is the y aesthetic property set to 1?
10 / 11

Group work

Your task is decipher how I made this graph

  • Why is the y aesthetic property set to 1?

  • What does shape = 124 do?

10 / 11

Group work

Your task is decipher how I made this graph

  • Why is the y aesthetic property set to 1?

  • What does shape = 124 do?

  • What does geom_hline() do in this viz?

10 / 11

Group work

Your task is decipher how I made this graph

  • Why is the y aesthetic property set to 1?

  • What does shape = 124 do?

  • What does geom_hline() do in this viz?

  • Why do I have to specifically add x axis text using the line theme(axis.text.x = element_text(color = "grey80"))?

10 / 11

Group work

Your task is decipher how I made this graph

  • Why is the y aesthetic property set to 1?

  • What does shape = 124 do?

  • What does geom_hline() do in this viz?

  • Why do I have to specifically add x axis text using the line theme(axis.text.x = element_text(color = "grey80"))?

Link to starter code

10 / 11

Next Week

11 / 11

Next Week

Course assignment: Complete lessons on advanced RMarkdown

11 / 11

Agenda

2 / 11
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow