Today we kick off Topic 2.b) Data Visualization by asking ourselves
What is a statistical graphic?
But a brief lesson from military history first:
Wed Sep 21, 2016
Today we kick off Topic 2.b) Data Visualization by asking ourselves
What is a statistical graphic?
But a brief lesson from military history first:
In 1812, Napoleon led a French invasion of Russia, marching on Moscow.
It was one of the biggest military disasters ever, in particular b/c of the Russian winter.
Famous graphical illustration of Napolean's march to/from Moscow
This was considered a revolution in statistical graphics because between
there are 6 dimensions of information (i.e. variables) being displayed on a 2D page.
A statistical graphic is a mapping of data
variables to aes()
thetic attributes of geom_
etric objects.
Where? | data |
aes() |
geom_ |
---|---|---|---|
top map | longitude | x |
point |
" | latitude | y |
point |
" | army size | size |
path |
" | army direction (forward vs retreat) | color |
path |
bottom graph | date | x |
line & text |
" | temperature | y |
line & text |
Wilkinson (2005) laid out the proposed "Grammar of Graphics"
Wickham implemented the grammar in R in ggplot2
package
Another seminal book is Tufte's "The Visual Display of Quantitative Information"
Name this graph type!
From ggplot2movies
package, the movies
data set:
From nycflights13
package, the flights
data set:
From fueleconomy
package, the vehicles
data set:
From babynames
package, the babynames
data set:
From okcupiddata
package, the profiles
data set:
Say hello to the 5NG: the five named graphs