Components of a plot

GGPlot vs Qplot

The main diffence between this two function is that we use ggplot() function when we plot data from a dataframe and qplot() function when we plot data from other different object from dataframes (Vectors usually.)

BarChart

the “identity” transformation will leave the data “as is”

The geom_bar by default uses a position adjustment of "stack", which makes each rectangle’s height proprotional to its value and stacks them on top of each other.

## Histograms

## Warning: Removed 2 rows containing missing values (geom_bar).

Facets

Facets are ways of grouping a data plot into multiple different pieces (subplots)

Pie Charts

The pie chart graph isn’t included in the library, so first is needed create a stacked bar chart

Coordinate System

Scatterplots

Line plots and linear and gaussian regresssion

## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

Word Cloud

## # A tibble: 10 x 2
##    word     freq
##    <chr>   <dbl>
##  1 shall      11
##  2 fight       7
##  3 may         6
##  4 will        6
##  5 europe      5
##  6 upon        5
##  7 victory     5
##  8 war         5
##  9 can         4
## 10 many        4

Radar charts

Waffle Charts

Boxplots

Creating maps

## Assuming "long" and "lat" are longitude and latitude, respectively

Other Visualization libraries