Book Image

Mastering Tableau

By : David Baldwin
Book Image

Mastering Tableau

By: David Baldwin

Overview of this book

Tableau has emerged as one of the most popular Business Intelligence solutions in recent times, thanks to its powerful and interactive data visualization capabilities. This book will empower you to become a master in Tableau by exploiting the many new features introduced in Tableau 10.0. You will embark on this exciting journey by getting to know the valuable methods of utilizing advanced calculations to solve complex problems. These techniques include creative use of different types of calculations such as row-level, aggregate-level, and more. You will discover how almost any data visualization challenge can be met in Tableau by getting a proper understanding of the tool’s inner workings and creatively exploring possibilities. You’ll be armed with an arsenal of advanced chart types and techniques to enable you to efficiently and engagingly present information to a variety of audiences through the use of clear, efficient, and engaging dashboards. Explanations and examples of efficient and inefficient visualization techniques, well-designed and poorly designed dashboards, and compromise options when Tableau consumers will not embrace data visualization will build on your understanding of Tableau and how to use it efficiently. By the end of the book, you will be equipped with all the information you need to create effective dashboards and data visualization solutions using Tableau.
Table of Contents (18 chapters)
Mastering Tableau
Credits
About the Author
www.Packtpub.com
Preface

Using R functions


Now that we have successfully connected Tableau with R, let's write some code in Tableau to invoke R. Within Tableau, open the Calculated Field Editor. Notice within the functions panel those entries beginning with SCRIPT_, as shown in the following image:

The SCRIPT functions are used by Tableau to invoke R. The function names communicate the data type of the returned results: SCRIPT_REAL returns float values, SCRIPT_BOOL returns T|F values, and so on.

The syntax of a SCRIPT function is represented in the following diagram:

Exercise - reproducing native Tableau functionality in R

For our first example, we will use the AVG, MEDIAN, and STDEV functions in Tableau and compare the results with the mean, median, and sd R functions. This will allow you to practice the SCRIPT functions, begin to understand R syntax, and compare results generated by Tableau with those generated by R:

  1. Navigate to https://public.tableau.com/profile/david.baldwin#!/ to locate and download the workbook...