As organizations move up the data science pyramid and begin to concentrate on advanced analytics, it’s important that they consider how to integrate their statistical findings into traditional BI tools. Many Modern BI tools offer native integrations, which may provide information to key decision makers with more clarity and speed than traditional, centralized options (such as ETL workflows into a central data warehouse). Tableau is an industry leading BI/Data visualization tool. Tableau offers native integrations with common statistical tools, such as R and Python, which enables enterprises with predictive analytics to inform decision making. In this blog post, we introduce features and applications of each technology to help you, your company, or your data scientist get started. Then, we outline the integration process for R and Python with Tableau and share our best practices.

Technologies:

Tableau

  • Leader in business intelligence (BI) and data visualization
  • Self-service, rich and intuitive user interface

R: Robust, statistical computing language

  • Purpose: Data Analysis, machine learning algorithms, statistical modeling
  • Features: Open-source, all-in-one analysis, powerful package ecosystem
  • Applications: Zillow, Microsoft, Twitter, AirBNB

Python: High-level programming language

  • Purpose: Data analysis, machine learning algorithms, general scripting
  • Features: Open-source, extensible, broad and Efficient libraries
  • Applications: Dropbox, Google, Facebook, Industry Light and Magic

It is important to note that we don’t recommend one computing language over another. If you currently use Python, there’s no reason to switch to R (or vice-versa). In fact, large companies like Facebook and Google use both R and Python. At Facebook, R is used in analysis of status updates, social network graphs, and colleague interactions. On the other hand, Facebook uses Python for infrastructure management, such as hardware imaging and operational automation.

Tableau Integration with Python and R
Tableau and TabPy Integration
  1. Install Tabpy from [Link]
  2. Navigate to folder: Tabpy-master > tabpy-server > tabpy_server > run startup.py
    1. Make note of port: 9004
  3. Switch back to Tableau: Help > Settings and Performance > Manage External Service Connection
  4. Once the “External Service Connection” dialogue box is open:
    1. Server = localhost
    2. Port = 9004
  5. Test your connection
Tableau and RServe
  1. Open up instance of R (either R Studio or R App)
  2. Run intall.packages(‘Rserve’)
    1. Pick a mirror – such as use ‘TX 1’
  3. Call library
    1. library(Rserve)
    2. Rserve()
  4. Switch back to Tableau: Help > Settings and Performance > Manage External Service Connection
  5. Once the “External Service Connection” dialogue box is open:
    1. Server = localhost
    2. Port = 6311
  6. Test your connection
Do More with Your Data
Best Practices for Tableau

Before you get started, it’s important to think of the direct integration as a means of delivering data holistically. When creating a dashboard in Tableau, you should strive to provide a 360-degree view of your business on a single dashboard. Also, be conscious of the visuals you choose, as the graphics should be optimized to best present your data. A powerful way to achieve this is to consider UI/UX and Grammar of Graphics best practices to help you select the right visuals for the job.

It’s also important to make sure your company has commonly agreed upon metrics to measure your business in the right way. With a reliable understanding of what your data represents, you can leverage Tableau’s integration abilities to connect all your data sources at once.

Best Practices for R & Python

Both R and Python offer different advantages and are preferred for different uses. Regardless of which you use, below are a few items to consider as you move forward with integration:

  • Get started on Machine Learning – Look for quick wins and low hanging fruit to quickly prove the value of Data Science.
  • Understand the Business Problem – Formulate your business problem into something solvable.
  • Minimize Moving Algorithms and Data – Deploy models to API end points to improve mobility.
  • Consider Issues and Test Before Launching ­– Properly vet algorithms before integrating them into your business.
Best Practices for Integration

There are two major ways to integrate Python and R with Tableau. You can either call Python or R scripts to process/transform data as needed (ETL/ELT) or directly integrate via API calls to models. While both will work, direct integration decreases architectural complexity and increases modularity of Data Science models, meaning you can build a central model that can be used in several ways across the firm. Another advantage with Direct Integration is that a Tableau professional can do most of the work, removing the need for multiple professionals across the data stack.

Why Integrate Tableau with R or Python?

Integrating Tableau with Python and R allows the enterprise to enable predictive analytics on their roadmap to the top of the pyramid. This will also help to create a single source of truth by visualizing the outputs of models that might be used elsewhere. Finally, all of this goes to the ultimate goal of data science – augmenting the business users’ ability to make data-driven decisions.

Whether you are at the beginning of your data science journey or are ready to implement these best practices, Sense Corp can help. With a team of skilled data scientist, we know how to turn your data into insights, helping you make the best decisions for your business.

Learn more about the data services we provide or contact us today.

Watch our Webinar Tableau for the Data Scientist

Tableau Integration with Python and R

Sign up to receive the latest insights.

We promise not to spam you and only send the good stuff!

  • Should be Empty: