Tableau vs. R Shiny: Which Excel Alternative Is Right For You?

Estimated time:

<span data-preserver-spaces="true"><strong>Update 2021</strong>: RStudio has released an R package for creating Tableau dashboard extensions using R and Shiny - <strong><a href="" target="_blank" rel="noopener noreferrer">shinytableau</a></strong>! You can now merge Tableau's ease of use with R Shiny's powerful data handling and creative control. Embed R-based visualizations and UI into your Tableau dashboard with shinytableau!</span> <span data-preserver-spaces="true">There are many dashboarding/reporting/BI tools out there, with the most popular ones being </span>Tableau<span data-preserver-spaces="true">, </span>PowerBI<span data-preserver-spaces="true">, and </span><a href="" target="_blank" rel="noopener noreferrer">R Shiny</a><span data-preserver-spaces="true">. The question quickly becomes - "How can I determine the right tool for my particular needs?" Today we'll compare two of the most widely used tools at Fortune 500 companies:</span> <ul><li><strong><span data-preserver-spaces="true">Tableau</span></strong><span data-preserver-spaces="true"> - an intuitive and straightforward drag and drop solution used for data analysis </span></li><li><strong><span data-preserver-spaces="true">R Shiny</span></strong><span data-preserver-spaces="true"> - a web framework written in R, widely used to make dashboards and interactive web applications</span></li></ul> <span data-preserver-spaces="true">For more BI tool comparisons be sure to check out our blog and read our articles on <a href="" target="_blank" rel="noopener noreferrer">Tableau, R Shiny, and </a></span>PowerBI<span data-preserver-spaces="true">.</span> <span data-preserver-spaces="true">Let's get one thing out of the way - </span>R Shiny<span data-preserver-spaces="true"> is not a reporting/dashboarding tool. Most people use it to make dashboards, so we can consider this comparison fair. As mentioned earlier, R Shiny<em> is</em> a full web framework. With it comes some obvious benefits and some considerations you need to have in mind when comparing it to tools like </span>Tableau<em><span data-preserver-spaces="true">. </span></em><span data-preserver-spaces="true">We'll examine the following areas where Tableau and R Shiny compete with one another and declare a winner (or tie) for each:</span> <ul><li><a href="#connectivity">Connectivity</a></li><li><a href="#chart-types">Chart Types</a></li><li><a href="#ease-of-use-1">Ease of Use: Simple Charts</a></li><li><a href="#ease-of-use-2">Ease of Use: Simple Dashboards</a></li><li><a href="#user-input">User Input and Interactivity</a></li><li><a href="#visual-styling">Visual styling</a></li></ul> At <a href="" target="_blank" rel="noopener noreferrer">Appsilon</a> we are global leaders in R Shiny and we've developed some of the world's most <a href="" target="_blank" rel="noopener noreferrer">advanced R Shiny dashboards</a>, so we have a natural bias towards using Shiny. However, many members of our team have experience with using Tableau in professional settings, and we will do our best to be impartial in this article to help you decide whether Tableau or R shiny is truly best for your particular needs. <h2 id="connectivity">Connectivity</h2> <em><span data-preserver-spaces="true">Tableau</span></em><span data-preserver-spaces="true"> comes with two options with regards to connecting to data. First, you can connect to a local file - such as </span><em><span data-preserver-spaces="true">CSV</span></em><span data-preserver-spaces="true">, </span><em><span data-preserver-spaces="true">Excel</span></em><span data-preserver-spaces="true">, </span><em><span data-preserver-spaces="true">JSON</span></em><span data-preserver-spaces="true">, </span><em><span data-preserver-spaces="true">PDF</span></em><span data-preserver-spaces="true">, </span><em><span data-preserver-spaces="true">Spatial</span></em><span data-preserver-spaces="true">, etc. Alternatively, you can connect to a remote server. The options there are far too many to list, so here's a screenshot of the current offerings (late 2020):</span> <img class="aligncenter size-large wp-image-5565" src="" alt="Tableau server connections" width="1024" height="283" /> <span data-preserver-spaces="true">So yeah, there are a lot of options with Tableau. On the other side, </span>R Shiny<span data-preserver-spaces="true"> uses </span>R<span data-preserver-spaces="true"> as the programming language of choice, so </span>Shiny<span data-preserver-spaces="true"> can connect to any source that </span>R<span data-preserver-spaces="true"> can. Just like with its competitor, the options here are endless. A simple Google search will yield either a premade library or an example of API calls for any data source type. For domain-specific sources, R Shiny can sometimes have an edge. For instance, with R Shiny you can load and analyze gene expression data or CAD files. These kinds of sources can be problematic for Tableau. </span> <p style="text-align: center;"><strong><span data-preserver-spaces="true">Winner (Connectivity): Tie, with an edge for R Shiny in domain-specific situations</span></strong></p> <h2 id="chart-types">Chart Types</h2> <span data-preserver-spaces="true">Once again, </span>Tableau<span data-preserver-spaces="true"> doesn't come up short here, with a plethora of visualization options such as bar charts, pie charts, line and area charts, and even more complex options such as geographical plots. Refer to the image below for the full list:</span> <img class="aligncenter size-full wp-image-5566" src="" alt="Tableau visualization options" width="772" height="378" /> <span data-preserver-spaces="true">Still, </span>R Shiny<span data-preserver-spaces="true"> demolishes the competition in terms of optionality for chart types. The most widely used visualization libraries are <code class="language-r">ggplot2</code> and <code class="language-r">Plotly</code>. Here's an overview of the types of visualizations you can make with <code class="language-r">ggplot2</code>:</span> &nbsp; <img class="wp-image-5567 size-full" src="" alt="GGplot2 visualization options" width="1166" height="578" /> Source: <a href="" target="_blank" rel="noopener noreferrer"></a> And here are some cool things that you can do with <span data-preserver-spaces="true"><code class="language-r">Plotly</code>:</span> <img class="wp-image-5568 size-full" src="" alt="Plotly visualization options" width="1058" height="576" /> Source: <a href="" target="_blank" rel="noopener noreferrer"></a> <span data-preserver-spaces="true">It's a no-brainer that </span><em><span data-preserver-spaces="true">R Shiny</span></em><span data-preserver-spaces="true"> wins this battle in terms of chart options overall.</span> <p style="text-align: center;"><strong><span data-preserver-spaces="true">Winner (Chart Types): R Shiny</span></strong></p> <h2 id="ease-of-use-1">Ease of Use: Simple Charts</h2> <span data-preserver-spaces="true">We'll now see the extent of the trouble you'll have to go through to create a simple bar chart, both in </span>Tableau<span data-preserver-spaces="true"> and </span>R Shiny<span data-preserver-spaces="true">. For demonstration purposes, we'll use the </span><a class="editor-rtfLink" href="" target="_blank" rel="noopener noreferrer"><span data-preserver-spaces="true">Titanic dataset</span></a><span data-preserver-spaces="true">, so download the <em>CSV</em> file linked here if you're following along. To be more precise, we'll create a bar chart containing </span><strong><span data-preserver-spaces="true">passenger classes</span></strong><span data-preserver-spaces="true"> on the x-axis and </span><strong><span data-preserver-spaces="true">average age</span></strong><span data-preserver-spaces="true"> on the y-axis.</span> <span data-preserver-spaces="true">Let's start with </span>Tableau<span data-preserver-spaces="true">. After the data imports, it's relatively easy to create a visualization. Just follow the steps from the image below:</span> <img class="alignnone size-full wp-image-13411" src="" alt="Tableau bar chart" width="1302" height="690" /> <span data-preserver-spaces="true">That was very easy, as </span>Tableau<span data-preserver-spaces="true"> was designed to be intuitive and simple to use for non-technical people. This ease of use comes with a cost called </span><strong><span data-preserver-spaces="true">customizability</span></strong><span data-preserver-spaces="true">, but more on that later. </span> <span data-preserver-spaces="true">Creating a simple chart is quite a different story with </span>R Shiny<span data-preserver-spaces="true">. We need to write actual code to get a simple bar chart. First, we need to aggregate the Titanic dataset somehow, so we have the data in a concise, visualizable format. Next, we need to introduce some amount of boilerplate to manage the UI and the server. It's only a couple of lines of code - negligible for larger projects, but a real obstacle for someone non-technical to create a simple chart.</span> <span data-preserver-spaces="true">Refer to the code below:</span> <figure class="highlight"> <pre><code class="language-r">library(shiny) library(ggplot2) <br>ui &lt;- fluidPage(    plotOutput('bar') ) <br>server &lt;- function(input, output) {    output$bar &lt;- renderPlot({        pclass_age_data &lt;- titanic %&gt;%            select(Pclass, Age) %&gt;%            group_by(Pclass) %&gt;%            summarise(Age = round(mean(Age, na.rm=TRUE), 2))        ggplot(data=pclass_age_data, aes(x=Pclass, y=Age)) +            geom_bar(stat='identity', fill='steelblue') +            geom_text(aes(label=Age), vjust=-0.3, size=5)    }) } <br>shinyApp(ui=ui, server=server) </code></pre> </figure> <span data-preserver-spaces="true">And here are the results:</span> <img class="aligncenter size-large wp-image-5570" src="" alt="Shiny simple bar" width="1024" height="480" /> <span data-preserver-spaces="true">As you can see, there's no point in using </span><em><span data-preserver-spaces="true">R Shiny</span></em><span data-preserver-spaces="true"> if all you need are simple and straightforward data visualizations without any interactive elements. That's where </span>Tableau<span data-preserver-spaces="true"> wins by a large margin. If you still want to use </span>R <span data-preserver-spaces="true">for charts and you're willing to put the effort in to have something fully customizable</span><span data-preserver-spaces="true">, then <code class="language-r">ggplot2</code> and <code class="language-r">Plotly</code> are great options. However, even making simple charts with R can be an onerous task for non-technical people. We recommend Tableau for these kinds of tasks.</span> <p style="text-align: center;"><strong><span data-preserver-spaces="true">Winner (Simple Charts): Tableau</span></strong></p> <h2 id="ease-of-use-2">Ease of Use: Simple Dashboards</h2> <span data-preserver-spaces="true">Alright, let's see who will win in <em>The Battle of the Dashboards</em>. We won't go too complex here, as dashboard development is a highly broad topic with many facets. Here's an outline of the charts we'll put into our dashboard:</span> <ul><li><span data-preserver-spaces="true">Bar chart - average age per passenger class</span></li><li><span data-preserver-spaces="true">Pie chart - genders</span></li><li><span data-preserver-spaces="true">Histogram - ages</span></li></ul> <span data-preserver-spaces="true">Also, all three charts should update when the user changes one of two filters:</span> <ul><li><span data-preserver-spaces="true">Age slider - range slider from minimum to the maximum age of the passengers</span></li><li><span data-preserver-spaces="true">Gender picker - option to exclude males or females from the visualizations</span></li></ul> <span data-preserver-spaces="true">Here's what the final dashboard looks like in </span><em><span data-preserver-spaces="true">Tableau</span></em><span data-preserver-spaces="true">:</span> <img class="aligncenter wp-image-5571 size-full" src="" alt="" width="1232" height="814" /> <span data-preserver-spaces="true">This entire dashboard required 0 lines of code. We just needed a couple of minutes of clicking in the right places. The dashboard situation is different in </span>R Shiny<span data-preserver-spaces="true">, as we need to write the actual </span>R<span data-preserver-spaces="true"> code there. However, it's not too bad of a deal, since </span>R<span data-preserver-spaces="true"> is relatively easy to learn, and the customization possibilities are endless for Shiny dashboards.</span> <span data-preserver-spaces="true">The following code recreates the dashboard we had in </span>Tableau<span data-preserver-spaces="true">:</span> <figure class="highlight"> <pre><code class="language-r">library(shiny) library(dplyr) library(ggplot2) library(titanic) titanic &lt;- titanic::titanic_train <br>ui &lt;- fluidPage(    sidebarPanel(        width = 2,        sliderInput(            inputId='ageslider',            label='Age range',            min=min(titanic$Age, na.rm=T),            max=max(titanic$Age, na.rm=T),            value=c(min(titanic$Age, na.rm=T), max(titanic$Age, na.rm=T))        ),        selectInput(            inputId='genderselect',            label='Gender',            choices=c('Male', 'Female'),            selected=c('Male', 'Female'),            multiple = TRUE        )    ),    mainPanel(        fluidRow(            column(8, plotOutput('bar')),            column(4, plotOutput('pie'))        ),        fluidRow(            column(12, plotOutput('hist'))        )    ) ) <br>server &lt;- function(input, output) {    output$bar &lt;- renderPlot({        pclass_age_data &lt;- titanic %&gt;%            filter(Sex %in% tolower(input$genderselect)) %&gt;%            select(Pclass, Age) %&gt;%            filter(Age &gt;= input$ageslider) %&gt;%            filter(Age &lt;= input$ageslider) %&gt;%            group_by(Pclass) %&gt;%            summarise(Age = round(mean(Age, na.rm=TRUE), 2))        ggplot(data=pclass_age_data, aes(x=Pclass, y=Age)) +            geom_bar(stat='identity', fill='#4179ab') +            geom_text(aes(label=Age), vjust=-0.3, size=5) +            ggtitle('Avg. age per passenger class') +            theme_void() +            theme(plot.title=element_text(size=20), panel.background=element_blank())    })    output$pie &lt;- renderPlot({        pie_data &lt;- titanic %&gt;%            filter(Sex %in% tolower(input$genderselect)) %&gt;%            filter(Age &gt;= input$ageslider) %&gt;%            filter(Age &lt;= input$ageslider) %&gt;%            select(Sex) %&gt;%            group_by(Sex) %&gt;%            count() %&gt;%            mutate(Midpoint = cumsum(n) - n / 2)        ggplot(pie_data, aes(x='', y=n, fill=Sex)) +            geom_bar(width=1, stat='identity', color='white') +            coord_polar('y', start=0) +            scale_fill_manual(values=c('#f34a53', '#4179ab')) +            ggtitle('Gender pie chart') +            theme_void() +            theme(plot.title=element_text(size=20))    })    output$hist &lt;- renderPlot({        hist_data &lt;- titanic %&gt;%            filter(Age &gt;= input$ageslider) %&gt;%            filter(Age &lt;= input$ageslider) %&gt;%            filter(Sex %in% tolower(input$genderselect)) %&gt;%            select(Age)            ggplot(hist_data, aes(x=Age)) +            geom_histogram(bins=20, color='#62aca8', fill='#1e9a95') +            ggtitle('Age histogram') +            theme_void() +            theme(plot.title=element_text(size=20))    }) } <br>shinyApp(ui=ui, server=server) </code></pre> </figure> <span data-preserver-spaces="true">And here's what the final product looks like:</span> <img class="aligncenter wp-image-5572 size-full" src="" alt="Shiny dashboard" width="1300" height="818" /> <span data-preserver-spaces="true">As you can see, this dashboard is quite unfinished. That's what we'll discuss in the last section of the article. It's hard to announce a clear winner here, but </span>R Shiny's dashboard<span data-preserver-spaces="true"> feels more solid to work in. </span>Tableau's<span data-preserver-spaces="true"> dashboard is way too sensitive to accidental clicks, and the dashboards look pretty similar in a stock-state</span><span data-preserver-spaces="true">. However, as we saw, you can make a simple dashboard much faster with Tableau than with R Shiny. For this reason, we'll declare Tableau the winner for simple dashboards, but only for <strong>ease of use</strong>. As you'll see, R Shiny is a much better choice if you intend to ratchet up the complexity and visual style of your dashboards.</span> <p style="text-align: center;"><strong><span data-preserver-spaces="true">Winner (Simple Dashboards): Tableau by a nose</span></strong></p> <h2 id="user-input">User Input and Interactivity</h2> <span data-preserver-spaces="true">Here's where things get especially interesting in our Tableau vs. R Shiny comparison. There's simply not much you can do with user input in </span>Tableau<span data-preserver-spaces="true"> - it's very limited, as it wasn't designed for such things. However, inputs are essential for a well-built and interactive dashboard as they provide a way to, well, interact with the app. <strong>Interactivity</strong> is where R Shiny seriously outshines Tableau. </span> R Shiny<span data-preserver-spaces="true"> provides a wide array of input options. Instead of listing them, it's better to show some of them:</span> <img class="aligncenter wp-image-5573 size-full" src="" alt="Shiny inputs" width="908" height="532" /> <span data-preserver-spaces="true">Yeah, that's a lot, and you can certainly do any task with them. One question that might immediately pop into your head as a business user: </span><strong><span data-preserver-spaces="true">why is interactivity so important?</span></strong><span data-preserver-spaces="true"> </span> <span data-preserver-spaces="true">Well, interactivity makes any dataset much easier to analyze. For example, the </span><em><span data-preserver-spaces="true">file input </span></em><span data-preserver-spaces="true">component can enable you to upload your own file to explore within the dashboard, which is then further filtered by date (</span><em><span data-preserver-spaces="true">date range input</span></em><span data-preserver-spaces="true">) and column selectors (</span><em><span data-preserver-spaces="true">var select</span></em><span data-preserver-spaces="true">). This is contrasted with read-only dashboards that don't allow the user to upload or interact with the data.</span> <span data-preserver-spaces="true">With R Shiny dashboards, you can also build complete interactive forms with password and text field input capabilities. That adds another critical layer of optionality for Shiny end users. Interactivity is a large part of what separates simple dashboards from powerful, enterprise-level business tools.</span> <p style="text-align: center;"><strong><span data-preserver-spaces="true">Winner (User Input): R Shiny</span></strong></p> <h2 id="visual-styling">Visual Styling</h2> <span data-preserver-spaces="true">Unfortunately, there isn't much you can do to tweak the visuals in </span>Tableau<span data-preserver-spaces="true">. It's designed to look good out-of-the-box, and it's up to you to change the colors, axes, titles, fonts, and other minor things. The amount of tweakable aspects depends on the type of plot you're tweaking, but in general, Tableau doesn't give you as much control as </span>Shiny<span data-preserver-spaces="true"> does. </span> <span data-preserver-spaces="true">Here's an example of how to change the colors of a histogram:</span> <img class="aligncenter wp-image-5574 size-full" src="" alt="Tableau tweaking" width="1278" height="618" /> R Shiny<span data-preserver-spaces="true"> is a whole other animal. You can customize everything. To start, create a folder <code class="language-r">www</code> right where your <code class="language-r">app.R</code> is located. Inside it, create a <code class="language-r">main.css</code> file. Yes, you've got it right - we can use everything </span><em><span data-preserver-spaces="true">CSS</span></em><span data-preserver-spaces="true"> has to offer when it comes to styling R Shiny dashboards.</span> <blockquote>Learn More: <a href="">How to Use CSS to Style Your R Shiny Dashboards</a></blockquote> <span data-preserver-spaces="true">To connect the </span>Shiny<span data-preserver-spaces="true"> app to a </span>CSS<span data-preserver-spaces="true"> file, we can put <code class="language-r">theme=main.css</code> right after the <code class="language-r">fluidPage</code> in the R file. That's all. It's really that simple. Here's what we managed to do in a couple of minutes with CSS and R Shiny:</span> <img class="aligncenter size-large wp-image-5581" src="" alt="Final Shiny dashboard" width="1024" height="856" /> <span data-preserver-spaces="true">Here's the <a href="">source code</a> for the final styled Shiny dashboard. Give this CSS optionality to a qualified designer, and you can achieve pretty much anything with R Shiny when it comes to visuals. One of our engineers even created an entire functional card-swiping video game in R Shiny by taking advantage of custom CSS styling (and some JavaScript magic). <img class="aligncenter size-full wp-image-5559" src="" alt="" width="866" height="415" /></span> <p style="text-align: center;"><em><a href="">Shiny Decisions</a> is a video game made in R Shiny by Appsilon engineer <a href="">Pedro Silva</a>.</em></p> <span data-preserver-spaces="true"> </span><span data-preserver-spaces="true">The winner for the visual styling section is once again pretty obvious. R Shiny blows Tableau out of the water when it comes to visual customization, even if Tableau dashboards look fairly decent out of the box. </span> <p style="text-align: center;"><span data-preserver-spaces="true"><strong>Winner (Visual Styling): R Shiny</strong></span></p> <blockquote>Looking for some attractive Shiny dashboard examples? Find inspiration <a href="">here</a> in our demo gallery.</blockquote> <h2>Conclusion</h2> <span data-preserver-spaces="true">Here are the final results, according to our calculations:</span> <ul><li><span data-preserver-spaces="true">R Shiny - 3 points</span></li><li><span data-preserver-spaces="true">Tableau - 2 points</span></li><li><span data-preserver-spaces="true">Tie - 1 point</span></li></ul> <span data-preserver-spaces="true">So, is </span>Shiny<span data-preserver-spaces="true"> is a clear winner for all situations? Well, no. It depends on the type of work you need to do. If you need to sketch a single chart or graph quickly, or need to make a dead-simple dashboard every now and then, </span>Shiny<span data-preserver-spaces="true"> may be overkill. </span>Tableau<span data-preserver-spaces="true"> was designed for exactly these sorts of tasks. Further, if you're a non-technical person and you don't want to dig too much into the actual code, then Tableau is a great choice for simple charts and dashboards. </span> <blockquote>Learn More: <a href="">Why You Should Use R Shiny for Enterprise Application Development</a></blockquote> <span data-preserver-spaces="true">Also, keep in mind that </span><strong><span data-preserver-spaces="true">Tableau isn't free</span></strong><span data-preserver-spaces="true">. Tableau licenses go up from a baseline of $70 per month when billed annually, so it's not an inexpensive piece of software. This isn't an issue for Fortune 500 companies, but if you are an individual trying to decide on the right tool, Tableau's price might be a dealbreaker. Alternatively, R Shiny is an open-source solution and is completely free to use (though if you need to host your Shiny app online, you might want to invest in an <a href="" target="_blank" rel="noopener noreferrer">RStudio Connect</a> license).</span> <span data-preserver-spaces="true">If you need to create powerful, customizable, and interactive dashboards that look great and respond to user input, then Shiny is a clear choice. Shiny requires a bit of coding knowledge even for simple dashboards, sure, but </span>R<span data-preserver-spaces="true"> isn't a very complicated language. Most people find R much easier to learn than you might think. You can quickly get up to speed in a couple of weeks <a href="" target="_blank" rel="noopener noreferrer">or even a couple of days</a>, depending on your prior knowledge of programming. <strong>If you want to make a scalable enterprise Shiny dashboard, then you can always reach out to <a href="" target="_blank" rel="noopener noreferrer">Appsilon</a> for help.</strong> We're constantly pushing the limits of what's possible with Shiny, and we'd be happy to provide guidance for you and your company. </span> <!--more--> <h2>Learn More</h2><ul><li><a href="">Tutorial: A Journey From Basic Prototype to Production-Ready Shiny Dashboard</a></li><li><a href="">How to Switch from Excel to R Shiny: First Steps</a></li><li><a href="">Make R Shiny Dashboards Faster with updateInput, CSS, and JavaScript</a></li></ul>

Contact us!
Damian's Avatar
Damian Rodziewicz
Head of Sales
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Have questions or insights?
Engage with experts, share ideas and take your data journey to the next level!
Join Slack
Explore Possibilities

Take Your Business Further with Custom Data Solutions

Unlock the full potential of your enterprise with our data services, tailored to the unique needs of Fortune 500 companies. Elevate your strategy—connect with us today!

Talk to our Experts
shiny dashboards
data analytics
excel alternatives