Variable Labels and Value Labels

COFHE-IR Tableau Training II
Marin Clarkberg and Deb Fyler, Cornell University
Session II: Tableau Tools
April 7, 2013
http://irp.dpb.cornell.edu/cofhe-chicago
Vocabulary






Workbook. A Tableau document with the suffix .twb. It may contain
worksheets and dashboards.
o A packaged workbook, .twbx, is a Tableau workbook integrated with
the data source and compressed.
Worksheet. Like in Excel, one ‘tab’ within a workbook.
Dashboard. Also a ‘tab’ within a workbook, a dashboard is a presentation
space for one or more worksheets. It may be linked to multiple or many
datasets.
Data. As with SPSS or another statistical software package, the data is
generally a separate, independent file. In Tableau, we start by “connecting” to
a data file, such as a .xls file or a .csv file.
Data Extract. Sort of similar with the .sav file with SPSS, you can save the data
in a format that will improve the performance of Tableau. This is a data
“extract”, .tde.
Viz. The hip Tableau way to say “graph” or “chart.”
Connect to a Data File
1. Open Tableau and select “Connect to data”
2. Select text file and choose to “IPEDS FTF
Fin Aid 08-11”. Comma delimited is the
default.
3. This is a file I downloaded from IPEDS late
last month. It contains information on
financial aid for first time full time degree
seeking freshmen for year 2008 to 2011 for
all COFHE schools plus a few more. All
data is in aggregate.
4. Select “Import All Data”. Tableau will ask where you want to store the extract file
that results (anywhere is fine, it’s your computer!).
[email protected]
[email protected]
1
Make a Table
Tableau imports your data and makes determinations on data type – that are not always
correct. Lucky for you, in this dataset, they almost all are!
Vocabulary

Dimensions. Roughly speaking, these tend to be categorical variables that you
might want to use to break the data into groups (e.g. sex, race, major). You
could also think of dimensions as your “independent variables.” Tableau starts
by assuming that all your non-numeric data is data that might want to use for
breakouts. You are not stuck with this designation.

Measures. Tableau starts by assuming that all numeric data is something that
you might want to sum, average, or trend. You might think of measures as your
“outcomes” or “dependent variables.” Of course it is not always appropriate to
take an average of a variable stored numerically (like, say, race stored as
numeric codes). Therefore, you may want to change some of your “measures”
into “dimensions”… a very easy task: just drag them.
1. Make unitid and Year dimensions.
2. Now make a crosstab: Drop the ‘number receiving institutional grant aid’ into
center of cross-tab. Note that it sums this measure.
[email protected]
[email protected]
2
Make Groups
Make a group - there are a few institutions included in this dataset that are not COFHE
schools.
1. Make two groups, one “COFHE” and one “Not COFHE” (U Calif, Illinois,
Michigan, Virginia, Wisconsin, and Caltech).
2. Filter on COFHE and make the filter “global” (Apply to worksheets>All Using
this Data Source) Now all worksheets you make in this doc will be limited to
COFHE schools.
3. Make a group of the COFHE schools by type (Ivies, non-Ivy universities,
women’s colleges, coeducational colleges)
Calculations
Create some calculated fields:

“Percent receiving Aid”: [number receiving federal- state- local or institutional
grant ai]/[Number of full-time first-time degree/certificate seeking Freshmen ]

“Percent receiving Inst Aid”: [number receiving institutional grant
aid]/[Number of full-time first-time degree/certificate seeking]

“Percent receiving Fed Loan”: [number receiving federal loan aid]/[Total number
of full-time first-time degree/certificate seeking ]

“Total Amt of Inst Aid”: [Avg amount of institutional grant aid
received]*[number receiving institutional grant aid]

“Percent receiving Pell”: [number receiving pell grants]/[Total number of fulltime first-time degree/certificate seeking ]
Make a duplicate worksheet and add a calc.
[email protected]
[email protected]
3
Charts
Format axes to be percentages.
Show Me
1. Start a new sheet by right clicking on the Sheet tab and selecting Duplicate Sheet.
[email protected]
[email protected]
4
2. Select the bar graph in the “Show Me” wizard and insert “instnm” into the color
box. Make all institutions blue and make your institution red (or another color).
Sort at top of column.
3. Add a reference line to Percent Fed Loan and/or other measures. Make all axes
the same. Format the fields. Add a “quick limit” for year.
4. Make a dashboard, add a title. Add ‘pages’ for year. Size it for an iPad and to fit
entire view. Format. Modify Tooltips.
[email protected]
[email protected]
5
Vocabulary

Tooltips. When you mouse over data displayed in a Tableau dashboard, text
will appear. This text is a “tooltip.” You can control what, exactly, is displayed
when people mouse over using the Tooltip function on the Marks card.
Sharing

Publish to Tableau Public (free) to post on the web for all to see and for all to
download – copy the email link to share.

Publish to Tableau Public Premium ($$) to post to the web (can disallow
downloading).

Send whole doc via e-mail to someone who has Tableau Reader (free) on their
laptop or computer.

Publish to your Tableau server
[email protected]
[email protected]
6
How Survey Data Look
1. Connect to the COFHE Senior Survey Excel file.
Because survey data are frequently stored as numeric codes (rather than with value
labels), Tableau considers them “measures.” This is helpful if you want to calculate
a mean, but less than helpful if you want to see the distribution of responses. It may
be helpful to convert some of these measures to Dimensions.
2. Duplicate one of the learning gains measures, like “cartlit” by right-clicking on it
and selecting “Duplicate.” Move the copy up to Dimensions.
3. List institutions as the rows in your table by moving inst_txt to the rows shelf.
Put your learning gains dimension (or another dimension) on the columns shelf.
4. At the bottom of the list of Measures is a Tableau-calculated measure called
“Number of Records.” Drag that into the crosstab on top of the Abc’s.
[email protected]
[email protected]
7
Vocabulary

Shelf. You will use the “Columns” shelf and the “Rows” shelf in Tableau.

Card. Cards just containers for the controls in Tableau. You will see the “Pages”
card, the “Marks” card, the “Filters” card and so forth.

Pills. The little blue and green rounded rectangles that contain the names of
your variables are called pills. For example, you might refer to the “Ssr
Component” pill or the “student id” pill. Blue pills are dimensions; green pills
are measures.
5. On the Marks card, right click on the green pill labeled “SUM(Number of
Records)”. Select “Quick Table Calculation” and then “Percent of Total.”
6. Exclude the Null values (right click on the word Null).
Variable Labels and Value Labels
They are gone, gone, gone! There is no way to import them from SPSS or SAS or
Stata or anything else. Yes, this seems incredible. We plow ahead:
1. Right click on the name of the survey measure being used as a dimension [e.g.
cartlit (copy)].
2. If you clicked on the pill, select “Edit Aliases.” If you clicked on the item in the
Dimensions pane, select “Default Attributes” and then “Aliases…”
3. Edit as appropriate.
[email protected]
[email protected]
8
Parameters
Vocabulary

Parameters. Parameters are part of what makes Tableau incredibly flexible and
powerful. I think of a parameter as a knob that I can design. I can not only tell
Tableau how the knob will look and what values it can take on, but I can also tell
Tableau what to do when someone the knob is set at each particular value.
The drop-down menus displayed below are done with parameters. The top
drop-down menu allows you to choose which survey item to look at. The lower
drop-down menu allows you to choose what will be displayed on the x-axis:
college, sex, or race/ethnicity/citizenship.
Creating a Parameter Control
1. Right-click in the Measures window and select “Create Parameter.”
2. Name the new parameter “Select an item from the 2012 Senior Survey.”
3. Select “String” next to the “Data type” prompt. Select “List” from
“Allowable values”.
4. You can save yourself the trouble of typing in list of variable names and
descriptors if you have that information available separately. So, for
[email protected]
[email protected]
9
example, in a different window, open an Excel spreadsheet that has variable
mnemonics and long descriptors in it. Copy both fields, as illustrated here:
Back in Tableau in the Edit Parameter dialogue box, press “Paste from
Clipboard.” You should see something that looks like this:
Click ‘ok’. You have now created a knob and designed its appearance. It
does nothing at all… until we tell what to do.
5. You now have a new pane below Measures labeled Parameters. Right click
on the parameter you just made and select “Show Parameter Control.” You
will then get a drop down menu that looks like this:
[email protected]
[email protected]
10
Using a Parameter Control to Drive Tableau
1. Right-click in the Dimensions window and select “Create Calculated Field.”
Rename it “Learning Outcome” or something else.
2. Using a combination of typing and clicking on Parameter names and Field
names, produce something along these lines:
Above, I completed only four of the possible values of our parameter, but
eventually we’ll want all 15 of them.
When you are satisfied you have enough, press OK to close the window.
3. Put your new parameter-driven calculated Dimension, Learning Outcome,
on the Columns shelf.
[email protected]
[email protected]
11
4. Edit the aliases for Learning Outcome (see bottom of page 8). Note: Once
you have fleshed out all fifteen learning outcomes that you now have a
display that allows you to view a whole survey bank, and you only had to
type on the value labels (or Aliases, in Tableau-speak) one time.
In no time at all, you can put your work into a fun dashboard:
[email protected]
[email protected]
12