First step is to install packages that will be used and then call its libraries with the function library().

The graphics that will be studied will take the demographic data of Blackwell´s company customers as example. First step is to load the data set to R studio.

2 Scatter plot

The scatter plot represents values for two different numeric variables. It is used to observe relationships between variables.

It looks a bit messy. With facet function a plot can be divided into subplots based on the values of one or more discrete variables.

It can still be divided into more subplots if we add another variable, for example, in.store.

The smooth function shows the trend of the data in a scatter plot.

## `geom_smooth()` using method = 'gam' and formula 'y ~ s(x, bs = "cs")'

3 Bar chart

To visulaize how categorical data is distributed it is used the bar columns plot.

The bar chart can still be subdivided if it is added another variable like in.store.

Another way to add more variables is with the geom_col() function.

One function that can be used in both scatter plot and bar chart is coord_flip() function that flips the Cartesian coordinates.

4 Boxplot

The boxplot is a standardized way of displaying the distribution of data based on 5-number summary (min, Q1, median, Q3 and MAX). It can tell you about outliers, if data is symmetrical, how tightly is data grouped and if and how data is skewed.