Module #3: Tableau

MATERIAL ON THIS PAGE USES NON-COVID DATA EXAMPLES

Tableau to Visualize Census Data 

Here’s a start:

–Download and clean the data: US Ark Counties Poverty ACS_16_5YR_DP03_with_ann-1w6iwss
We have a lot of data in this spreadsheet. Let’s simplify things. We will visualize just one column- Column J –:
“Percent; INCOME AND BENEFITS (IN 2016 INFLATION-ADJUSTED DOLLARS) – Total households – $15,000 to $24,999”
–Copy the “Edited Poverty” tab and rename it Min Wage Only
–Delete all of the columns except for the Percent; INCOME AND BENEFITS (IN 2016 INFLATION-ADJUSTED DOLLARS) – Total households – $15,000 to $24,999″

–Fix the column headings so it plays nice with Tableau. Delete the Row 1 “GEO.display-label…”
–Simplify your new column B: % Households – $15k-$25k
–Save, backup etc and open Tableau.
–Import  your data
–Open new tab
–Geography to Columns. % Households $15k- $25k to rows
–Sort by largest-smallest
–Filter by Geography – drag Geography to Filter. Filter to keep the following:
Arkansas,  Benton,Carroll, Crawford, Madison, Sebastian, United States, Washington
Formatting. This is the standard formatting you will apply to all of your charts in some fashion. We are simplifying and clearly marking the labels
–Drag to Label in Marks box: % Households $15k- $25k to rows
–Format Label to % – Format | Pane | Default | Numbers | Numbers: Custom | 1 decimal. % as suffix.
–Format Y Axis to %. – Format | Axis | Scale | Numbers | Number: Custom | no decimal, % as suffix.
–Color the bars. Drag to colors in Marks box: % Households $15k- $25k to rows. Edit colors to blue – red scale, reverse colors so red = highest.
–Label graph: Double Click on “Sheet 1” above the chart. Text box emerges with  <Sheet Name> Type in name of chart: Minimum Wage Households Percentage of Households Earning $15,000-$24,999 in 2016 Source: U.S. Census
–Fix X axis labels (squished) . Drag the right chart out to expand the visualization.
Export image
–Worksheet | Export | Image
–Click off color legend option
–Title Minimum Wage Arkasas. Save as .jpeg

Histogram


This is a detailed walk-through of how to add a cumulative distribution to a histogram in Tableau. 
 
Build a histogram with % Female Households in Poverty
Easiest method: click on% Female Households in Poverty and choose the histogram from Show Me
Find out where this is happening: drag Geography to the pane. Now hover your mouse over the blocks and you will see the counties.
 
Duplicate the CNT(Profit) pill on Rows by Ctrl+drag the pill next to itself on the Rows shelf
This gives you a new marks card – now you can create 2 different types of mark for a single data field. On the new marks card “CNT(Profit)(2)”, change the mark type to a lineChange the color as well, if desired
Right click on the duplicated field on the Rows shelf and make it a dual axis
Apply a Quick Table Calculation of Running Total to the duplicated field
[[If students find this histogram to be uninteresting, add a filter on Profit to ignore outliers (maybe go from -500 to +500). Then right-click Profit(bin) dimension and Edit to make the bin size smaller, maybe 25.]]
Create a Reference Line for Poverty
Step 1 – Build the View
Drag % Female Households – Children 5 Years to the Rows shelf.
Drag Geography to the Columns shelf.
Step 2 – Create Parameters
Right-click in the Data pane and then select Create Parameter.
Name the parameter “Arkansas Average”.
Under Data Type select Integer.
Under Current Value, set to 55.8
Under Allowable values select All.
Click OK.
Step 3: Create the calculated field
Select Analysis > Create Calculated Field.
Name the calculated field “Reference Line”.
In the formula field, enter the following formula:
IF[% Female Households – Children 5 years younger]=[Arkansas Average] THEN [Arkansas Average] END
Click OK.
Step 4 – Use the calculated field as a Parameter Control
Drag the “Reference Line “calculated field to Details. This is the box below Color in the Marks Card
Click the arrow to change the measure from SUM to Minimum.
In the view, right-click on the Y axis and select Add Reference Line.
In the Value drop down menu, select Minimum(Reference Line).
In the Label drop-down menu, select Value.
Click OK.

Visualize the income distribution in a histogram
% of Female Households – Children 5 Years and Younger.
–Drag to Columns
–Show me: Select Histogram
–Distribution of the poverty level.

Bins and Groups
Create Bins: https://onlinehelp.tableau.com/current/pro/desktop/en-us/calculations_bins.htm
Other options besides bins:
 Use parameters to organize data: https://onlinehelp.tableau.com/current/pro/desktop/en-us/parameters_create.htm
 Use sets to organize data: https://onlinehelp.tableau.com/current/pro/desktop/en-us/sortgroup_sets_create.htm#Use
Create Bins: https://onlinehelp.tableau.com/current/pro/desktop/en-us/calculations_bins.htm
Format Filters – See video below
Use parameters to organize data: https://onlinehelp.tableau.com/current/pro/desktop/en-us/parameters_create.htm
Use sets to organize data: https://onlinehelp.tableau.com/current/pro/desktop/en-us/sortgroup_sets_create.htm#Use