close
close

first Drop

Com TW NOw News 2024

Tableau in R for alt=
news

Tableau in R for $0 (Introducing GWalkR)

(This article was first published on business-science.io, and kindly contributed to R-bloggers). (You can report issue about the content on this page here)


Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t.

Hey guys, welcome back to my R-tips newsletter. Today I’m introducing GWalkR: An R package for Exploratory Data Analysis in 1 line of code. Just like Tableau. But Costs $0 (100% free). Let’s go!

Table of Contents

Here’s what you’re learning today:

  • What is GWalkR? You’ll discover what GWalkR is and how it makes Exploratory Data Analysis in R easier
  • How I Replaced Tableau with GWalkR (A $0 Alternative): How I use GWalkR to replace Tableau
  • How to use GWalkR inside of R to Make 4 Common Plots: I have prepared a full R code tutorial (get the code and data here).

Tableau in R: GWalkRTableau in R: GWalkR

Get the Code (In the R-Tip 083 Folder)


Inside the workshop I’ll share how I built a Machine Learning Powered Production Shiny App with ChatGPT (extends this data analysis to an insane production app):

ChatGPT for Data ScientistsChatGPT for Data Scientists

What: ChatGPT for Data Scientists

When: Wednesday August 14th, 2pm EST

How It Will Help You: Whether you are new to data science or are an expert, ChatGPT is changing the game. There’s a ton of hype. But how can ChatGPT actually help you become a better data scientist and help you stand out in your career? I’ll show you inside my free chatgpt for data scientists workshop.

Price: Does Free sound good?

How To Join: 👉 Register Here


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. Pretty cool, right?

Here are the links to get set up. 👇

I have an 11-minute video that walks you through setting up GWalkR in R and running your first exploratory data analysis with it. 👇

GWalkR is a Tableau alternative that is 100% freely available in R. It includes 95% of the drag-n-drop features for fast EDA that Tableau has. And you can use it right in R. Github: https://github.com/Kanaries/GWalkR

For Python users, the pygwalker library is the equivalent tool in Python. Github: https://github.com/Kanaries/pygwalker

Both GWalkR and pygwalker made by Kanaries, which offers a paid version that includes more features like cloud hosting, sharing, and AI.

KanariesKanaries

Tableau ReplacementTableau Replacement

I can replace roughly 95% of Tableau with the free version of GWalkR.

What Am I Using The Free Version For?

  1. Quick Exploratory Analysis: This is what GWalkR is great for
  2. Data Aggregations: See Aggregations below with Sum, Median, Means, Min/Max, etc
  3. Data Distributions: See the Data Explorer in the R Tutorial Next
  4. Time Series Analysis:
  5. Doing Box Plots
  6. Visualizing Common Transformations (Log)

What Can’t It Do For Free?

You’ll need to use the paid version if you want to:

  1. Saving Charts
  2. Sharing Charts and Analysis
  3. AI features like GPT Data Exploration and Chat Interface
  4. Team Collaboration

My Thoughts…

You’ll want to weigh your analytics needs. If you’re just doing analysis for yourself like I do 90% of the time. Then sharing isn’t a big deal. I’ll just make an RMarkdown with the final plots, analysis, and report when I need to share.

In this section, I’ll share how to make 4 common data visualiations (plots):

  1. Bar Plot
  2. Scatter Plot
  3. Box Plot
  4. Time Series Plot

It takes about 10 seconds to get GWalkR set up so you can start doing drag-n-drop exploratory data analysis (just like Tableau) inside of R. All the tutorial code and data sets shown are available in the R-Tips Newsletter folder for R-Tip 083.

Get the Code and Data SetsGet the Code and Data Sets

Get the Code and Datasets (In the R-Tip 083 Folder)

Step 1 – Install and Run GWalkR:

The first step is to set up GWalkR. Run this code to install GWalkR, load the key libraries, and read in the first data set (MPG Data) that will explore together.

Run This CodeRun This Code

Get the Code (In the R-Tip 083 Folder)

This will produce the GWalkR in the Viewer Pane inside RStudio:

GWalkRGWalkR

Get the Code (In the R-Tip 083 Folder)

Now you’re ready to explore and analyze the first data set.

Step 2 – Analyze the MPG Data Set

Let’s get our feet wet with some of the basic features of GWalkR. We’ll explore the “mpg” data set in the data folder of R-Tip 083.

Plot 1: Make a Bar Plot

A bar plot is the most basic plot that is an aggregation (sum, average, etc) applied to 1 numeric feature. The bars are formed by segmenting by 1 categorical feature.

Bar PlotBar Plot

Get the Code and Data Set (In the R-Tip 083 Folder)

To make a bar plot, we need to:

  1. Drag and drop “class” a categorical feature to the X-axis, and “hwy” a numeric feature to the Y-axis.
  2. Make sure Aggregation Mode is On, and select aggregation type of “mean” on the hwy numeric variable
  3. Select Container Mode to expand the chart
  4. Sort the data ascending

Plot 2: Make a Scatter Plot

A scatter plot is an un-aggregated plot that will help us detect trends between 2 numeric features.

Scatter PlotScatter Plot

Get the Code and Data Set (In the R-Tip 083 Folder)

Now that you have a feel for how it works, creating a scatter plot is pretty easy:

  1. Create a new chart (Chart 2)
  2. Drag cty and hwy to X and Y-axis, respectively
  3. Add some color by vehicle class
  4. Add Details (hover tips) by dragging manufacturer and model to the Details section
  5. Hover over the data to see which vehicle has better or worse city and highway fuel economy

Plot 3: Make a Box Plot

A box plot applies Jon Tukey’s method for displaying the distribution of data using median, 1st and 3rd quartiles, and outliers. It’s great for detecting general trends and exposing outliers.

Box PlotBox Plot

How to recreate this plot:

  1. Create a new plot
  2. Turn aggregation mode off
  3. Select Plot Type –> Box Plot
  4. Drag hwy and class to the X and Y axis, respectively
  5. Drag class to Color
  6. Rotate the Box Plot so the class is on the Y-axis

Step 3 – Time Series Data

Now let’s work with a time series dataset. Run this code:

Run This CodeRun This Code

Get the Code and Data Set (In the R-Tip 083 Folder)

That will produce this GWalkR session in the Viewer pane:

Time Series DataTime Series Data

Plot 4: Make a Time Series Plot

A time series plot is a useful way to visualize trends in time series data (contains a date or time stamp).

Time Series PlotTime Series Plot

To recreate this plot:

  1. Turn off aggregation mode
  2. Create a Log10 Transformed Version of Weekly Sales (click the dots next to weekly sales)
  3. Drag Date to the X-Axis, and id and log10(Weekly_Sales) to the Y-axis
  4. Filter the id by dragging id to Filters, then select 1_1, 1_3, and 1_8 only.
  5. In settings (gear icon), de-select the option to include zero in the plot.

Reminder: The code and data is available free inside R-tips

All of the code you saw today is available in R-Tips Newsletter folder for R-Tip 083

Get The Data Sets and CodeGet The Data Sets and Code

Get the Code (In the R-Tip 083 Folder)

The GWalkR package makes it easy to explore data. In fact, I’ve used it to replace 95% of my Tableau work. But there’s more to becoming a data scientist.

If you would like to grow your Business Data Science skills with R, then please read on…

I’ve helped 6,107+ students learn data science for business from an elite business consultant’s perspective.

I’ve worked with Fortune 500 companies like S&P Global, Apple, MRM McCann, and more.

And I built a training program that gets my students life-changing data science careers (don’t believe me? see my testimonials here):

6-Figure Data Science Job at CVS Health ($125K)
Senior VP Of Analytics At JP Morgan ($200K)
50%+ Raises & Promotions ($150K)
Lead Data Scientist at Northwestern Mutual ($175K)
2X-ed Salary (From $60K to $120K)
2 Competing ML Job Offers ($150K)
Promotion to Lead Data Scientist ($175K)
Data Scientist Job at Verizon ($125K+)
Data Scientist Job at CitiBank ($100K + Bonus)

Here’s the system that has gotten aspiring data scientists, career transitioners, and life long learners data science jobs and promotions…

What They're Doing - 5 Course R-TrackWhat They're Doing - 5 Course R-Track

Join My 5-Course R-Track Program Now!
(And Become The Data Scientist You Were Meant To Be…)

P.S. – Samantha landed her NEW Data Science R Developer job at CVS Health (Fortune 500). This could be you.

Success Samantha Got The JobSuccess Samantha Got The Job