Data Visualization: ggplot2 in R Basics

No matter what kind of data work you are doing, at the end of every task, people, your audiences will always want to see some graphs. Even people with most sophisticated data/programming skills want to see some simple illustration that immediately deliver the message. In this case, data visualization is very important.

I am using R as my primary language when analyzing data. R is a very powerful language and for most people without programming experience, it is easier than most other language. And this conclusion is based on learning Python and C++ by myself.

R has a very powerful package called ggplot2. GG stands for Graphic Grammar, an idea developed by Leland Wilkinson. There is a book that he wrote about this package and the idea behind it. If you are interested in learning more complex ideas about this graphic grammar, you can find this book online.

Here I will just do a simple illustration of what a common ggplot code looks like and how each part works.

Continue reading