I have seen many discussions around Tableau Vs. R. Here are my thoughts on this topic. Tableau is a fantastic tool for pattern discovery using data visualization. It is usually my tool of choice when I want throw some data and keep playing with the data to see whether any patterns emerge. Learning and using Tableau is a very low time consuming activity, but you could keep playing with the data and nothing might emerge.
Whereas, R has a very steep learning curve; any investment you make in R, however, will be returned to you with significant rewards.
R is easily more than a programming language; it is almost a whole framework.
You have access to countless libraries:
- from data manipulation to data visualization
- from machine learning to financial analysis
- from interactive Google charts to mining Shakespeare's work
- to web apps
Why learn R?
If very few people are using R around you, then it is more the reason to learn R, because soon you’ll be wowing them (and future employers) with your skills. Remember: if something is easy to do, everybody is doing that thing; you will become indistinct by becoming a commodity. Better, become indispensable.
If something is easy to do, everybody is doing that thing; you will become indistinct by becoming a commodity. Better, become indispensable
Difficulty and learning
There's no sugarcoating this: R is difficult to learn. When you just starting out, you will be confused with matrix and vector, the way R likes to store data.
Hadley Wickham's many libraries, including dplyr and ggplot, and tidyverse make it easy to get started with R.
Here's how Tableau and R compare; notice the distance between them.
As as example of R's power, consider the following report I created in R.
It is reporting an inclination score (generated using R), showing sparklines (again R), getting data from SQL Server data warehouse, and then repeating the analysis for every region and every capacity range.
More than 100s of nice looking pages within seconds.
If there were only two reasons to use R, I would say these:
You can do everything in R in one script. Then you can come back to it after a few years, and still able to track your steps down.
As I see it, it is really not Tableau vs. R issue. They can be used together.
For all Tableau’s promises, I believe that only few people actually use it for exploration and it becomes another reporting a.k.a BI tool.
I use Tableau for exploring, finding quick patterns and then coding that in R to reproduce the patterns for all various combinations. Tableau is not hard to learn at all. You can quickly build dashboards together without actually thinking about the process or about your objective of actionable insights.
In addition, since it is easy to create charts, there is a real danger of quickly creating many useless charts.
Here’s another example of R’s magic: a convex hull to cluster customers (so getting data, clustering, convex hull and mapping in one single script) to find regions with opportunity.
RStudio provides a nice interface and makes R very easy to use. RStudio supports Markdown which produces nice looking documents or HTML pages with the benefit of retaining all your code to reproduce all your numbers and graphs with newer data.
One more advantage of Markdown: Markdown is very easy to learn.
If you want to create more controlled, beautiful looking documents, however, you can take the complicated, frustrating, yet rewarding route, and rely on knitr, LaTex, Sweave, and RStudio.
A great example of using rmarkdown is Rodger Devine and my book: Data Science for Fundraising: Build Data-Driven Solutions Using R. We wrote this complete book (graphs, code, text, index, citations, epub, and many more) in R using Yihui Xie's fantastic bookdown R package. If THAT doesn't convince you about the power of R, nothing else can.
More examples of R
A really good example of the power of R is in creating interactive, web-pages or applications. Here, using the Game of Throne characters and this data set, visNetwork library easily created this fully interactive network. (Note: I'm unable to embed the map in the wordpress easily, but here's an export)
Using R, I was able to show the growth of Walmart in the US. Graphs, check. Animation, check.
One of the biggest advances in R programming was the development of Shiny environment by RStudio. This made creating web-apps very easy. Here's one example from the RStudio gallery:
Overall Pros and Cons of Tableau vs R
- Super-easy to use
- Not hard to learn
- Beautiful visualizations out-of-the-box
- Very powerful
- Very fast
- Lots of data connectors
- Short learning curve
- Big community
- Data manipulation is a pain
- Limited to visualizations
- Sharing workbooks (for confidential data) is a challenge (expensive)
- Huge community
- Lots of libraries
- Can do pretty much everything
- web extraction
- machine learning
- statistics (duh)
- data visualization
- interactive reporting
- Difficult to learn
- Need to know/learn programming
- Errors are hard to pin-point
Further Reading: Tableau and R Books
Don't take my word for it
Here's what some of practitioners and experts in this area said about each Tableau and R:
Vice President, Enterprise Data Science and Marketing Analytics at Charles Schwab
Tableau for versatility, enterprise scaling and support, ease and breadth of data connections, bigger user base and active community support, decent visualizations, ease of use for non analytics users, active work on evolving product roadmap R or even D3 is a bit special case tool for custom visualization and only specific applications.
Consultant, Analytical Solutions at Marts & Lundy, Inc.
Tableau is easier for me to explore data, but as I become more frustrated with exporting Tableau charts that can be inserted into Word and PowerPoint without graph degradation, I need to switch to R.
Senior Executive Director at University of Southern California
Tableau is great for rapidly building visualizations, dashboard mockups and decision support tools. Even though there's a learning curve with both tools, R is open-source which makes packaging and distributing analyses possible with others who are willing to learn and don't readily have access to Tableau.
Data Scientist at University of Southern California
I like Tableau for putting something simple together quickly. It is super easy to just drag and drop a few things and the end result is a production quality visualization. However, for addressing any amount of nuance or just for trying to do something a little more complex, I prefer R. I find it easier to discover code samples to do what I want to do. Also, once I have the code then I can reuse it for future projects which is a nice advantage.
Program Manager at University at Buffalo
Tableau offers much better graphical aspect of data analytics. The visualization aspect of Tableau is much more intuitive and customizable as compared to similar functionalities in R.
The choice of the tool has major correlation with the organizational culture. Few key factors that play a role in selection of data analytics/ reporting tool are availability of resources, data maturity, level of innovation, decision-making process (intuition-driven vs. data-driven, authoritative vs. collaborative), etc.
In sum, R provides you with everything: data extraction, manipulation, analysis, visualization, and reporting. Don't let the learning curve scare you; you are missing out if you are not using it.
Last update on 2022-05-05 / Affiliate links / Images from Amazon Product Advertising API
Very informative article! Thank you
read it while learning shiny,
I’m glad you enjoyed it, Nikhil.
[…] like Tableau make visualization easier, as long as you identify the relationships. How does each point relate to another? What patterns do […]
I’m not sure about this… I think the correct comparison is between Tableau and Power BI, and then Python vs R. BTW, I don’t think Python is easier to learn R… not since the advent of the Tidyverse. R is really easy now! 🙂
I appreciate your different take, Amit. Thanks for your comment. The Tableau vs. R comparison is valid when one is just starting or deciding which tool to learn or use. Yes, things are easier with R now, but Python is a mature programming language, whereas, R still shows its origins as a statistical tool. But RMarkdown is a game-changer.
I enjoyed reading your article very much. It made me more excited to learn R in addition to Tableau.
Nice info and elegant presentations. Just a quick one
Can R and Tableau join hands and use postgres metadata to bring some time-series analysis and help tableau server/site admins. Would you point me to some solid use-cases? Sincerely. Raj
[…] Why use R when you have tableau? Tableau vs. R? (2019, December 3). nandeshwar.info. https://nandeshwar.info/data-science-2/tableau-vs-r/ […]
I really like the visualization about difficulties and learning. But I wondered if you have any data to support this visualization?
🙂 No, this is based on my painful experience of getting started with R. That chart serves an illustrative purpose. Gartner may have some data on this.
Thanks, Jordi. I’m glad you found the article useful.
Rajendra, I don’t think I understand your question. R and Tableau both can fetch data from different databases. (Also, my name is Ashutosh :))
Thank you very much for your replying! I am currently working on an assignment about R and Tableau. This is super helpful. Who is Gartner and how can I get in touch with him to get the dataset?
You’re welcome! Gartner is a leading research and advisory firm. They rank different tools every year in their magic quadrant. I would search for something like:
gartner data analytics tools filetype:pdfin a search engine. Here are two white papers I found: 2019 analytics magic quadrant and 2017 magic quadrant.
[…] that is why I love R because of these […]