Effectieve verklarende grafieken

Introductie tot datavisualisatie met ggplot2

Rick Scavetta

Founder, Scavetta Academy

Ons doel: een effectieve verklarende grafiek

Introductie tot datavisualisatie met ggplot2

Volledige data

dplyr::glimpse(gm2007_full)
Observations: 142
Variables: 3
$ country   <fct> "Afghanistan", "Albania", "Algeria", "Angola", "Argentina", "Au...
$ lifeExp   <dbl> 43.828, 76.423, 72.301, 42.731, 75.320, 81.235, 79.829, 75.635,...
$ continent <fct> Asia, Europe, Africa, Africa, Americas, Oceania, Europe, Asia, ...
1 We beginnen met onze volledige dataset, met drie variabelen voor 142 landen.
Introductie tot datavisualisatie met ggplot2

Eerste verkennende grafieken - verdelingen

ggplot(gm2007_full, aes(lifeExp)) +
  geom_histogram()

Introductie tot datavisualisatie met ggplot2

Eerste verkennende grafieken - verdelingen

ggplot(gm2007_full_arranged, 
        aes(index, lifeExp)) +
  geom_point()

Introductie tot datavisualisatie met ggplot2

Eerste verkennende grafieken - verdelingen

ggplot(gm2007_full_arranged, 
        aes(index, lifeExp, col = continent)) +
  geom_point()

Introductie tot datavisualisatie met ggplot2

Onze data

dplyr::glimpse(gm2007)
Observations: 20
Variables: 3
$ country   <fct> "Swaziland", "Mozambique", "Zambia", "Sierra Leone", "Lesotho...
$ lifeExp   <dbl> 39.613, 42.082, 42.384, 42.568, 42.592, 42.731, 43.487, 43.82...
$ continent <fct> Africa, Africa, Africa, Africa, Africa, Africa, Africa, Asia,...
> 
Introductie tot datavisualisatie met ggplot2

Introductie tot datavisualisatie met ggplot2

Gebruik intuïtieve en aantrekkelijke geoms

Introductie tot datavisualisatie met ggplot2

Voeg tekstlabels toe aan je grafiek

Introductie tot datavisualisatie met ggplot2

Gebruik passende schalen

Introductie tot datavisualisatie met ggplot2

Voeg nuttige titels en bronvermeldingen toe

Introductie tot datavisualisatie met ggplot2

Verwijder niet-data-inkt

Introductie tot datavisualisatie met ggplot2

Voeg drempellijnen toe

Introductie tot datavisualisatie met ggplot2

Voeg informatieve tekst toe

Introductie tot datavisualisatie met ggplot2

Voeg verfraaiingen toe

Introductie tot datavisualisatie met ggplot2

Laten we oefenen!

Introductie tot datavisualisatie met ggplot2

Preparing Video For Download...