ggplot

Exploration
Look at distributions
Examine relationship between variables
Communication
Illustrate your findings in ways that are digestible
Make or support an argument
Leland Wilkinson wrote The Grammar of Graphics (2nd edition, 2005)
Developed the grammar of graphics
Described fundamental elements that make up a statistical graphic
Hadley Wickham created the R package ggplot2 to create graphs based on Wilkinson’s grammar of graphics (gg)
ggplotThe ggplot2 package is available as part of the tidyverse set of packages:
You can also load the package separately:
Source: UCI Repository
Rows: 731
Columns: 16
$ instant <dbl> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, …
$ dteday <date> 2011-01-01, 2011-01-02, 2011-01-03, 2011-01-04, 2011-01-05…
$ season <chr> "winter", "winter", "winter", "winter", "winter", "winter",…
$ yr <dbl> 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011,…
$ mnth <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,…
$ holiday <chr> "No Holiday", "No Holiday", "No Holiday", "No Holiday", "No…
$ weekday <chr> "Saturday", "Sunday", "Monday", "Tuesday", "Wednesday", "Th…
$ workingday <chr> "Holiday", "Holiday", "Working Day", "Working Day", "Workin…
$ weathersit <chr> "Misty and Cloudy", "Misty and Cloudy", "Clear", "Clear", "…
$ temp <dbl> 0.3441670, 0.3634780, 0.1963640, 0.2000000, 0.2269570, 0.20…
$ atemp <dbl> 0.3636250, 0.3537390, 0.1894050, 0.2121220, 0.2292700, 0.23…
$ hum <dbl> 0.805833, 0.696087, 0.437273, 0.590435, 0.436957, 0.518261,…
$ windspeed <dbl> 0.1604460, 0.2485390, 0.2483090, 0.1602960, 0.1869000, 0.08…
$ casual <dbl> 331, 131, 120, 108, 82, 88, 148, 68, 54, 41, 43, 25, 38, 54…
$ registered <dbl> 654, 670, 1229, 1454, 1518, 1518, 1362, 891, 768, 1280, 122…
$ count <dbl> 985, 801, 1349, 1562, 1600, 1606, 1510, 959, 822, 1321, 126…
Scales - translate what is in the graph to what is in the data using legends or axes
Theme - set overall how the graph looks
ggplotTheme by Beatriz Mills on GitHub