Parts of a Whole
Data Visualization and Design  CUNY Graduate Center  Summer 2019
Goals
 Decide which partsof a whole visualization is most effective for your data
 Explore different methods to visualize the same dataset, communicating a similar story
Data
Parts of a Whole
 Pie Chart
 Multiple Pie Charts
 bubble bar Charts
 Tree maps
 Heatmaps
 Stacked Bar
 Multiples Scattered
 Waffle
 The key to a Waffle Chart is the auxiliary table. You need an excel spreadsheet with row number, column number, and percentages. This will provide the framework to build your visualization on. This is the "Tableau Waffle Structure" Sheet. You can use this for every Waffle Chart you ever make 🙂
We’ll start by cleaning up our AirBnB data source
 First we need to make a Column for every Borough with a 1 if that record belongs to that borough. We’ll start with Brooklyn Name your field ‘CALC: Bklyn’
IF [Neighbourhood] = "Brooklyn" THEN "1" END
Repeat for all the other boroughs.
 Create another Calculated Field with the percentage that each borough represents individually.
 Name your fiels ‘CALC: Bklyn %’
SUM(INT([CALC: Bklyn]))/COUNT([Host Id])
Repeat for all the other boroughs
 Add the TableauWaffleStructure.xlsx as an additional dataset. You will NOT join these datasets.
Now we will move over to a new sheet. In the New Sheet,
 The AirBnb_NYC dataset should already be loaded.
 Select the TableauWaffleStructure.xlsx as your primary dataset.
 Drag Row to Rows and Column to Columns.
 Go to Analysis Menu (in the header) and untick ‘aggregate measures’ to show each value individually.
 Change the shape to square and increase the size to get a waffle.

Then we create another calculated field that links these two datasets. From the Data Pane, use the dropdown menu to Create a Calculated Field (this new field will appear in the TableauWaffleStructure dataset). The purpose will be to tell our waffle how many squares to color

Name your field ‘CALC: Bklyn Color’
[AirBnB_NYC (airbnb)].[CALC: Bklyn %] >= SUM([Percentage])
Repeat for all the other boroughs. (this technically isn’t necessary because of a mathematical quirk, but if you do this with other datasets, you’ll need this step)  Drag this calculated field to color marks card and your waffle should appear – for Brooklyn vs. Everywhere else in NYC.
 You can change the shape from square to any other custom shape.
 Hide the headers and gridlines by editing the axes.

Add percentages on the chart in annotations if required.
If you wish to make a waffle grid with more than one category, you will have to write a rather complicated statement to make a calculated field that is dependent upon all of the categories you want to include. Here we’ve made Brooklyn, Manhattan, and Other
IF [AirBnB_NYC (airbnb)].[CALC: Bklyn %] >= SUM([Percentage]) THEN "Brooklyn" ELSEIF [AirBnB_NYC (airbnb)].[CALC: Bklyn %] + [AirBnB_NYC (airbnb)].[CALC: Mnhtn %] >= SUM([Percentage]) AND [AirBnB_NYC (airbnb)].[CALC: Bklyn %] <= SUM([Percentage]) THEN "Mahattan" ELSE "Other Borough" END
To use your Waffle Chart in a story, you will have to play with the size a bit – it works better in a dashboard.