Presenter: Jie Zhang
Link to Tableau answers workbook: https://github.com/jiezhang28/presentations/blob/master/tip_tricks_for_presentation_answers.twbx
Link to Tableau Level of Detail feature: https://stanford.box.com/s/bclwssox8ahipdxbg69u9wtzcqwv1mjw
Notes: Aayush Neupane
Location: Alway Building, M208
Time: 9:15 - 10:00
Operations Intelligence
-
Work outside of stanford
-
Pull data, analyze data to discover insight, present to businesses
Live Coding
Data Source Pivot
-
Survey data
-
Usually wide table
-
Tableau creates a lot of measures, which might be useless
-
Also offers a “pivot” feature
-
Select the columns that you wouldn't need, right click -> pivot.
-
Using repeated columns and creating them into rows
-
-
-
Convert text data to force to use “text”
-
Created average of scores based on questions, divided by gender.
-
Q - what are you trying to achieve using this format?
-
A - This is helpful to analyze survey data
Right Click Drag
-
Right click and dragging a field gives you a list of options of type of field you’d want to use
-
Useful for dates where default is year
-
Quick Histogram
-
Useful for seeing distributions
-
Click on a measure, go to showme, click histogram
-
Wait for data to load, and that will use the ranges in data
-
-
Log transform
-
Log([measure], 2) -> gives you a traditional histogram
-
Pricing of houses by zip code
-
column: longitude
-
Row: latitude
-
Marks: median price, zip code
-
Using log(price) gives you a better color coding instead of a traditional histogram
Add to Context
-
Row: id
-
Marks: Max(Price)
-
Used top 10 priciest houses
-
Filtering by zip code originally clears all results
-
Need to run zip code filter before top10
-
Right click on filter -> Add to context
-
-
Data source filter > Context Filter > Filter
Level Of Detail (LOD)
-
House sell value data
-
If a house was sold multiple times, it will have multiple records.
-
Overall sell value was inflated by multiple records
-
-
Row: Id (kc_house_data)
-
Filter: sum(number of records)
-
Fixed id: max(price)
-
Force each house to have a single max price as its record
-
Donut Chart
-
Pie charts are bland looking
-
Create a calculated field
-
Value 0
-
-
Drag that to row, twice
-
First chart, increase size
-
Second chart, remove color, add label to the middle
-
Join both charts at the end, you’ll see a donut chart with label in the middle
Jitter
-
Box plot of bottle of wine prices
-
If theres a lot of data points are collected in same place, use jitter to separate data
-
Create a new measure called index()
-
Easier to see data that's not just on single dimension
Source control
-
Havent tried it, but tableau is XML file, source control is possible
Drawing shapes on tableau
-
Takes a while to prepare, but it is possible using x, y coordinates
Word Cloud
-
Filter: id
-
Row: Description
-
Create a word cloud out of the description
-
Tableau needs in format as 1row per word
-
-
Change the words to lowercase : lower(description)
-
Remove all punctuations: regexp_replace(string, pattern, replacement)
-
Figure out tokens within the descriptions
-
Create a calculated field called token
-
len(regexp_replace(text, ‘\w+’, replacement)) -> replace all words words with spaces and then count those spaces.
-
-
Force a inner join with no matching constant
-
Cartesian join
-
-
Create filter
-
Index <= token
-
-
Create data source filter
-
Repeat rows that only have repeated words
-
-
2 more layers of transformation
-
Break down the tokens using findnth() function

