Data Visualization with R - ggplot2 - Part1

R has several systems for visualizing data, ggplot2 is one of them. ggplot2 is pretty easy to use and offers various options to generate impressive graphs to wow your users. This post is to showcase usage of ggplot and its impressive features.
What you need: 
  • R System installed on your PC.
  • R - Studio Or if you prefer R Console
  • tidyverse package
What is tidyverse ?  tidyverse is a collection of packages that supports most commonly used packages for data manipulation and visualization. It contains below packages:
  • data visualization - ggplot2
  • data manipulation - dplyr
  • data tidying - tidyr
  • data import - readr
  • functional programming -purr
Usage - To start using tidyverse, one need to load the package into R first. Loading the package is very easy, just fire up R-Studio and issue below command:

The "ggplot2" package has several data sets which we can use for plotting graphs. To view details about the data sets ( obeservations => rows, variables => columns) , type the data set name at command prompt , as below. This will lists a sample data and the variable names.

To know what each of these variables (columns) in the data set means just use the help function :

The help function can be used with any of the R commands / packages to know more details about them.

How to use "ggplot2" in next part... soon.

1 comment:

AWS CLI - Error - AWS was not able to validate credentials

I have set up AWS EC2 instance through AWS Management Console and able to launch it.  While using AWS CLI to connect to instances I encounte...