Hi, everyone, this lesson is going to be about ggplot2 or the ggplot2 package.
And we're going to, I'm going to talk about how to
do some basic plots using the ggplot2 package and what it's about.
And in this, in the next lecture I'll talk a little bit in more detail
about how it's designed and how you
can make extensions to various ggplot2 plotting functions.
So the first question very basic. You know, what is ggplot2?
Basically it's a package
in R that you can download from CRAN.
And and it implements what's called the
grammar of graphics, which is originally written by
Leland Wilkinson and it is described in a, in a book called the Grammar of Graphics.
Now the Grammar of Graphics is a description of how
kind of graphics can be broken down into abstract concepts.
You can, so think of the grammar of a language like English.
You have things like verbs and nouns and adjectives.
And so
the question is, you know, what are the
verbs, nouns, and adjectives of a data graphic?
And the Grammar of Graphics kind of describes kind of those basic elements
so that you can put them together to make new types of graphics.
Just like you could take a verb and a noun and an
adjective and make a new sentence that maybe no one's ever heard before.
You could take the grammar of graphics and put together various aspects
of plots and make a graphic that no one's ever seen before and
so that's the basic idea.
It's a very powerful concept to kind of organize all kinds of data graphics.
And until recently there was no specific implementation for it
in R, but Hadley Wickham who when he was a graduate
student at Iowa State implement the Grammar of Graphics as an
R package called ggplot and its current implementation is called ggplot2.