Analyze Data Efficiently with Esquisse: An Overview of a Powerful Tool
Written on
Introduction to Esquisse
Have you ever been faced with a large dataset for a project and needed to quickly gain insight? You might start by examining the data's initial entries, generating summaries in a terminal or Jupyter Notebook, or even opening it in Excel. Alternatively, you might create some overview plots using libraries like matplotlib or ggplot2.
However, there's a more streamlined way to do this! I recently discovered Esquisse, a beautifully designed open-source tool inspired by the popular commercial software Tableau. While it’s referred to as a tool, it’s essentially an R package that enables users to load data and produce stunning visualizations through a simple drag-and-drop interface.
In this article, I will introduce you to the free and open-source tool Esquisse, highlighting its features such as data loading, variable selection, visualization options, data filtering, plot refinement, and exporting capabilities.
Exploring Esquisse
The main goal of Esquisse is to help you quickly explore your data and uncover valuable insights. It allows for visualizations using {ggplot2}, data filtering with {dplyr}, and even the retrieval of the generated code. For setup, Esquisse can easily be integrated into your analysis scripts. It operates as a Shiny application, making it accessible even without a specific data project.
At the top of the interface, you can select different plot types, including bar plots, box plots, and scatter plots. The variables from your loaded dataset are displayed, allowing you to map them to the x- and y-axes, as well as to colors, sizes, and groups. The central canvas showcases your plotted results, which refreshes with any changes you make in data mapping. The bottom section features tools for annotating your plot, adjusting layouts, filtering data, and exporting ggplot2 code.
Getting Started with Esquisse
To install Esquisse, simply enter the following command in your R terminal:
install.packages("esquisse")
To load the library, use:
library("esquisse")
In this article, I will use the Gapminder dataset to illustrate example visualizations. Gapminder data is available under the Creative Commons Attribution 3.0 Unported license. You can check out how to set it up in "7 Data Wrangling R Functions for Your Next Data Science Project."
Once installed, you can invoke Esquisse by selecting data from your R environment, importing a CSV or XLS file, pasting data, or using a Google spreadsheet.
Utilizing Features
In this section, I will delve into the impressive data analysis and visualization capabilities of Esquisse. The first feature is data importing, which I mentioned earlier.
After importing your data, clicking on the table icon presents a comprehensive view of the dataset. This feature is particularly useful for verifying data points and checking for discrepancies in your visualizations. The search function is invaluable here, and you can sort data by clicking on the column headers. However, data filtering must be done outside of this view.
Creating Visualizations with Ease
Esquisse supports various commonly-used graph types, including line charts, area plots, bar graphs, box plots, and maps. You can leave the selection on "Auto" during data mapping, and the tool will suggest an appropriate graph type based on your selections.
Alongside graph type options, you have access to the available columns in your dataset. Numerical variables are marked in blue, while categorical variables appear in orange. You can drag these variables into designated areas to map your data accordingly. For instance, in a box plot, you might map continents on the x-axis and populations on the y-axis.
Data Filtering Capabilities
Typically, I prefer to filter data before generating visualizations. Esquisse allows you to filter data on-the-fly. By clicking the "Data" button, a pop-up appears with your numerical and categorical variables, allowing you to adjust ranges using sliders or selections.
Finalizing Your Visualization
After mapping your data and choosing a graph type, you can annotate your plot. In the "Labels & Title" section, specify the title, subtitle, caption, and axis labels.
You can also modify various plot options, such as axis limits and transformations (e.g., log10). The "Flip Coordinate" feature can transform a vertical bar chart into a horizontal one.
With the "Appearance" options, you can select color palettes and apply ggplot2 themes. For example, I chose the "Economist White" theme, as shown in the accompanying images.
Exporting Your Work
By clicking the "download icon" on your plot, you can choose from multiple output formats. The "More Options" section allows for further customization of dimensions.
Another useful feature is the ability to export the underlying code. Since Esquisse utilizes ggplot2 to create visualizations, the exported code can be used to recreate the plot in your own R scripts. This not only aids in understanding ggplot2 but also enhances your plotting skills by examining the generated code.
Conclusion
This article introduced you to Esquisse, an open-source tool that simplifies the data analysis and visualization process. With features like data loading, variable selection, visualization types, filtering, and exporting, it’s an excellent resource for quickly grasping new datasets and generating initial plots.
I personally find Esquisse invaluable for my workflow. What are your thoughts on this tool? Feel free to share in the comments.
If you're interested in following my journey or learning more, consider subscribing or joining as a Medium member.
Thank you,
Gregor