ggplot2: visualizing the palmerpenguins dataset
ggplot2 is a tidyverse R package for making visualizations and stems from the construction that is more useful to elaborate a ‘grammar of graphics’ . It is often viewed as one of the best packages for visualizations . In fact, there is no shortage of tools for making graphs in R such as Lattice and base R graphics . Nevertheless, ggplot2 possesses an easy elegance that simplifies the conceptualizing of visual tools. It is easy to add complexity or take it away which makes ggplot2 practical to many actors from scientists presenting research and to business analysts supplying those key insights. ggplot2 generally consists of three layers: the data source, the aesthetic mappings which describes how variables are mapped and geometries (or geoms) you project e.g scatterplots, lines , bars histograms etc. There are other layers or nuances like scales , themes ,facets and coords. These are used extensively below in the palmerpenguins dataset.