Book Image

Tableau 10 Business Intelligence Cookbook

By : Donabel Santos, Paul Banoub
Book Image

Tableau 10 Business Intelligence Cookbook

By: Donabel Santos, Paul Banoub

Overview of this book

Tableau is a software tool that can speed up data analysis through its rich visualization capabilities, and help uncover insights for better and smarter decision making. This book is for the business, technology, data and analytics professionals who use and analyze data and data-driven approaches to support business operations and strategic initiatives in their organizations. This book provides easy-to-follow recipes to get the reader up and running with Tableau 10, and covers basic to advanced use cases and scenarios. The book starts with building basic charts in Tableau and moves on to building more complex charts by incorporating different Tableau features and interactivity components. There is an entire chapter dedicated to dashboard techniques and best practices. A number of recipes specifically for geospatial visualization, analytics, and data preparation are also covered. By the end of this book, you’ll have gained confidence and competence to analyze and communicate data and insights more efficiently and effectively by creating compelling interactive charts, dashboards, and stories in Tableau.
Table of Contents (17 chapters)
Tableau 10 Business Intelligence Cookbook
Credits
About the Author
Acknowledgements
About the Reviewer
www.PacktPub.com
Preface
Index

Creating an area chart


An area chart is very similar to a line chart (time series graph) with the area between the axis and the line shaded. A stacked area chart segregates the area, based on related categories. Area charts may allow trends to be more easily spotted because the eye focuses on a bigger area rather than comparing lines.

In this recipe, we will create an area chart that will show the results of restaurant re-inspections in New York City from June 2012 to June 2016.

Getting ready

To follow this recipe, open B05527_01 – STARTER.twbx. Use the worksheet called Area, and connect to the DOHMH New York City Restaurant data source.

How to do it...

The following are the steps to create the area chart for re-inspections:

  1. Change the mark type to Area in the Marks card.

  2. From Measures, drag Number of Records to Rows.

  3. From Dimensions, right-click and drag Inspection Date to Columns. This will open a window asking for the specific value to place.

  4. Choose continuous month. This is the MONTH(Inspection Date) option in the fourth section, with a green calendar icon to its left.

  5. From Dimensions, right-click drag Inspection Date to Filter. This will open a window that shows the possible variation of values that can be used.

  6. Choose to filter by discrete year, which is the third option called Years with a blue # beside it, and then click Next >.

  7. Under the General tab, choose all years except for 1900.

  8. Under the Wildcard tab:

    • Type the keyword Re-inspection in the Match value: text box

    • Choose Contains in the radio button options

    • Leave the checkbox to Include all values when empty checked

  9. From Dimensions, right-click and drag Grade to Color in the Marks card.

  10. Click on the drop-down arrow beside the color legend and choose Edit colors….

  11. Choose the Color Blind 10 palette and click on Assign Palette. Click on OK when done.

  12. Right-click on an empty area in your chart and select Annotate, and then Area.

  13. Add the following annotation, and place it on top of the area that represents the A grades.

How it works...

Area charts look like line charts (or time series graphs) that have shaded areas. Area charts are also similar to stacked bar charts, where the areas are cumulative. It is best used when you want to show the cumulative value of the measures you are using. Area charts, however, bear the same risks as the stacked bar chart. Because individual areas are stacked, it is hard to compare the different areas because they don't all start in the same level.

Creating an area chart is similar to creating your line chart and your stacked bar chart. You create a time series graph first. By default, Tableau will create a time series graph (or line graph) first when you put a Date or Date & Time field in either Rows or Columns, and a Measure in the other.

Once you have the time series graph, you can change the mark to Area, and drop a dimension in Color in the Marks card to create the different colored areas.

There's more...

I've often asked students in my training classes when they would usually use area charts, and majority of the time students mention budgeting. With budgeting, they care about what proportion over time goes to which categories, but they also care about the cumulative value of the budget.

See also

  • Please refer to the Creating a stacked bar chart recipe in this chapter