DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • Enhancing Business Decision-Making Through Advanced Data Visualization Techniques
  • Next.js Theming: CSS Variables for Adaptive Data Visualization
  • From Data to Decisions: Visualizing SAP Insights With Python
  • How To Create a Network Graph Using JavaScript

Trending

  • Can You Run a MariaDB Cluster on a $150 Kubernetes Lab? I Gave It a Shot
  • Cloud Security and Privacy: Best Practices to Mitigate the Risks
  • Why Database Migrations Take Months and How to Speed Them Up
  • Beyond Simple Responses: Building Truly Conversational LLM Chatbots
  1. DZone
  2. Data Engineering
  3. Data
  4. Drag and Drop Visualization in R

Drag and Drop Visualization in R

Explore drag and drop visualization in R and look at how to install esquisse in R.

By 
Sibanjan Das user avatar
Sibanjan Das
DZone Core CORE ·
Feb. 20, 19 · Tutorial
Likes (4)
Comment
Save
Tweet
Share
9.7K Views

Join the DZone community and get the full member experience.

Join For Free

Data Visualization is a crucial component of any data related task. If you are a Business Analyst or Data Analyst, you need visualization to understand the data. If you are a Data Scientist, visualization is a critical component in your day-to-day tasks. R has been one of the go-to tools for visualizing data and creating machine learning models for Data Scientists. ggplot2 is one of the best and reliable tools in R to create great graphs. However, you need to remember ggplot2 commands to generate graphs, and it has a lot of syntaxes!

So, most of us prefer Tableau to do quick data analysis before creating models in R. It was amazing to discover a tableau-like package Esquisse in R that provides the same flexibility of drag and drop functionality to create graphs. You can also export the chart to a PNG or Powerpoint format and even copy the ggplot2 code from the tool and embed it in the R code. Sounds incredible, doesn't it? The credit for creating such an incredible package goes to DreamR, who has also developed other shiny-based R applications that might benefit you as well. Check them out from this link.

Installing esquisse in R is simple and is available in CRAN. You can run the following command in R:

install.packages("esquisse")

Next, load the library and initialize the application as shown in the below code snippet.

library(esquisse)
esquisse::esquisser()

Once it is initialized successfully, it will pop up the app, which looks similar to the following screen:

Image title

Next, you can select the data frame from the list of active data frames in the R session.

Image title

Alternatively, one can also directly pass the data frame as an input while invoking the application.

library(esquisse)
esquisse::esquisser(mtcars)

Once, the data is uploaded and validated successfully; the attribute names appear in the list of variables. If this list of variables appears, we are all set to try out different graphs for the uploaded dataset. One can try creating a univariate graph by dragging only a single variable to X field.

Image title

Also, we can create bivariate graphs by selecting variable for X and Y fields easily.

Image title

There are also various other options to add labels and titles, choosing colors and selecting a subset of data for plotting in the applications. Overall, it has got all the possibilities that ggplot2 provides to make a graph better and visually appealing. If you are not sure about the functionality of ggplot, check this article out.

Image title

Next, we can export the R ggplot2 code from the "Export & code" section as shown below. This code is fully functional and can be used in your R scripts directly.

Image title

If you want the graph to be part of a presentation or a report you are preparing, you can directly export the graph as PNG or PowerPoint.

Using esquisse, it becomes easy to create impressive graphs in R and use it any way we like it. However, it is just a tool that enables us to make plots easily, but it is up to us to choose what graph suits our needs well along with reflecting visualization best practices. If you want to know more about this, then check out our previous article on Demystifying Data Visualization.

R (programming language) Data visualization

Opinions expressed by DZone contributors are their own.

Related

  • Enhancing Business Decision-Making Through Advanced Data Visualization Techniques
  • Next.js Theming: CSS Variables for Adaptive Data Visualization
  • From Data to Decisions: Visualizing SAP Insights With Python
  • How To Create a Network Graph Using JavaScript

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!