Introduction to Esquisse Add-In

Esquisse is a ggplot2 builder add-in that allows you to explore data. With this add-in you will be able to create a visualization using ggplot2 package such as bar plots, scatter plots, and histograms to name a few. In addition, you will be able to filter data by using dplyr package, both actions without having to write code.

Installing & Loading

You can install esquisse with function “install.packages()” and load it with “library()”

install.packages("esquisse")

library(esquisse)

Preparing the Esquisse Add-In

Once you have installed the esquisse package and load it, you can add a data set that you would like to analyze. For this example, I will be using a data set called “mtcars.” This data set was extracted from a 1974 Motor Trends US magazine regarding fuel consumption and ten other aspects of auto design and performance. The set includes information for 32 cars from the years 1973 and 1974.

I’ve included the function “head(mtcars)” to call the first rows of the data set and the “str(mtcars)” as an alternative to a summary.

esquisser()
data("mtcars")

head(mtcars)
str(mtcars)

Using Esquisse

-Once you run the chunk and you will receive a pop-up window.

-From the drop down, you will be able to select your desired data set.

-You can then validate your data with a click of a button, and you will land in a canvas to create your chart/plot.

-Once you are creating the chart you can chose your chart style, edit your labels and titles, you will have plot options such as size and colors, you will be able to filter your data.

-Lastly, once you have created your chart you can copy the code and paste it to RStudio and view it there too.

Code for my Chart

I am not able to show the table because an automatic pop-up appears when the code is added as esquisser is not within RStudio, but I’ve included the code I received when creating my chart.

esquisser()

ggplot(mtcars) +
 aes(x = drat, y = mpg) +
 geom_point(size = 2.84, colour = "#0c4c8a") +
 geom_smooth(span = 0.75) +
 labs(x = "Horsepower", y = "Miles per Gallon", title = "Realtion between Horsepower and Miles per Gallon") +
 theme_minimal()