This article is part of R-Tips Weekly, a weekly video tutorial that shows you step-by-step how to do common R coding tasks.
Here are the links to get set up. ?
grafify Video Tutorial
For those that prefer Full YouTube Video Tutorials.
Learn how to use
grafify in our free 7-minute YouTube video.
What is grafify?
grafify is a new R package for making great-looking
ggplot2 graphs quickly in R. It has 19 plotting functions that simplify common ggplot graphs and provide color-blind friendly themes.
We’ll go through a short tutorial to get you up and running with
Before we get started, get the R Cheat Sheet
grafify is great for making quick
ggplot2 plots. But, you’ll still need to learn how to wrangle data with
dplyr and visualize data with
ggplot2. For those topics, I’ll use the Ultimate R Cheat Sheet to refer to
ggplot2 code in my workflow.
Download the Ultimate R Cheat Sheet. Then Click the “CS” next to “ggplot2” opens the Data Visualization with ggplot2 Cheat Sheet.
Now you’re ready to quickly reference
Onto the tutorial.
How grafify works
grafify package extends
ggplot2 by adding several simplified plotting functions. In this tutorial, we’ll cover:
Load the Libraries and Data
First, run this code to:
- Load Libraries: Load
- Import Data: We’re using the
mpgdataset that comes with
Scatterbar SD Plot
First, we can make a Scatterbar Plot that shows the data points along with error bars at a standard deviation. Simply use
Next, we can make a Scatterbox Plot that shows a custom boxplot / jitter plot combination. I’ve added a jitter point to show the distribution. Simply use
Next, we can make a Dotviolin Plot that shows a custom violin plot / dotplot combination. Simply use
Scatterbox 3D Plot
Next, we can make a 3D Scatterbox Plot that shows three variables using boxplot / jitter plot combination. This is great for drilling into multiple categories. Simply use
Finally, we can make a Before-After Plot that shows changes between two states (in this case how various models changed in MPG Fuel Efficiency from 1999 to 2008). This is great for comparing two states. Simply use
With 19 plotting functions, the
grafify package makes it quick and easy to make custom
ggplot2 visualizations that are easy to visualize and explore data. With that said, it’s critical to learn
ggplot2 for plots beyond what
If you’d like to learn
ggplot2 and data science for business, then read on. ?
My Struggles with Learning Data Science
It took me a long time to learn data science. And I made a lot of mistakes as I fumbled through learning R. I specifically had a tough time navigating the ever increasing landscape of tools and packages, trying to pick between R and Python, and getting lost along the way.
If you feel like this, you’re not alone.
In fact, that’s the driving reason that I created Business Science and Business Science University (You can read about my personal journey here).
What I found out is that:
Data Science does not have to be difficult, it just has to be taught smartly
Anyone can learn data science fast provided they are motivated.
How I can help
If you are interested in learning R and the ecosystem of tools at a deeper level, then I have a streamlined program that will get you past your struggles and improve your career in the process.
It’s called the 5-Course R-Track System. It’s an integrated system containing 5 courses that work together on a learning path. Through 5+ projects, you learn everything you need to help your organization: from data science foundations, to advanced machine learning, to web applications and deployment.
The result is that you break through previous struggles, learning from my experience & our community of 2000+ data scientists that are ready to help you succeed.
Ready to take the next step? Then let’s get started.
? Top R-Tips Tutorials you might like:
- mmtable2: ggplot2 for tables
- ggside: Plot linear regression with marginal distributions
- DataEditR: Interactive Data Editing in R
- openxlsx: How to Automate Excel in R
- officer: How to Automate PowerPoint in R
- DataExplorer: Fast EDA in R
- esquisse: Interactive ggplot2 builder
- gghalves: Half-plots with ggplot2
- rmarkdown: How to Automate PDF Reporting
- patchwork: How to combine multiple ggplots
Want these tips every week? Join R-Tips Weekly.