Day 28 of viz with me

Data viz Beginner ggplot esquisse add_ins video DataViz Challenge

An add-in for effortless dataviz with a video demo.

Soundarya Soundararajan true
2024-10-28

Welcome to Day 28! We’re wrapping up Week 4 as we dive into today’s exciting topic.

Today, we’re exploring a beginner-friendly and intuitive tool for data visualization in R called esquisse. This add-in lets you create visualizations with minimal effort and, crucially, provides the R code for each plot, ensuring reproducibility for future use.

Let’s jump into esquisse! (Meyer and Perrier 2024)

Getting Started with esquisse

Installing esquisse is straightforward.

install.packages("esquisse")

Once installed, esquisse appears as an add-in within RStudio. Here’s how you can access it:

  1. Open RStudio.

  2. Click on the “Addins” tab in the top menu.

  3. Select “ggplot2 builder” from the esquisse dropdown menu.

  4. A new window will open, displaying a variety of plot types on the left and your dataset on the right.

  5. Select the plot type you want to create and drag and drop the variables into the appropriate fields.

Selecting ggplot2 builder from esquisse add-in

Let’s use esquisse to create one of our favorite visualizations: a scatterplot with the Palmer Penguins dataset.

Using esquisse

Step 1: Load the Data

For esquisse to work, you need to have the data loaded into your environment. Let’s load the necessary packages and dataset:

library(tidyverse)
library(palmerpenguins)
penguins <- palmerpenguins::penguins

Now, with our penguins data stored in penguins, we’re ready to jump into esquisse.

Step 2: Open esquisse and Create the Plot

Go to the Add-ins menu and click on esquisse.

Since our data is already loaded, you’ll see the penguins dataset once you click environment.

Select import data.

Configure your scatterplot or any other plot type you prefer.

On the top you see I have selected X, Y and the fill variables and the plot is quickly produced right below

Once your plot is ready,

  1. You can choose to download the plot
Right side of the plot has a download button which lets you download many formats including pdf
  1. You can move the codes to the script directly. For this an .R file should be opened in RStudio.

  1. You can also choose to copy and past the script.

This code is reproducible, so you can run it anytime to recreate the same plot.

Step 3: Customize and Save

Feel free to tweak the titles, themes, and other aesthetics as needed within the code.

Congratulations!

By now, you’ve explored how to use esquisse to simplify the plotting process, and you’ve learned enough to build on the code even when esquisse doesn’t provide every option. Don’t forget to save your scripts for future reproducibility!

I will see you tomorrow!

Meyer, Fanny, and Victor Perrier. 2024. “Esquisse: Explore and Visualize Your Data Interactively.” https://CRAN.R-project.org/package=esquisse.

References

Citation

For attribution, please cite this work as

Soundararajan (2024, Oct. 28). My R Space: Day 28 of viz with me. Retrieved from https://github.com/soundarya24/SoundBlog/posts/2024-10-28-day-28-of-viz-with-me/

BibTeX citation

@misc{soundararajan2024day,
  author = {Soundararajan, Soundarya},
  title = {My R Space: Day 28 of viz with me},
  url = {https://github.com/soundarya24/SoundBlog/posts/2024-10-28-day-28-of-viz-with-me/},
  year = {2024}
}