Database Reference
In-Depth Information
SELECT corpus, SUM(word_count)
FROM [publicdata:samples.shakespeare]
GROUP BY corpus
Figure 13.6 Tableau bar graph of Shakespeare corpus versus word count
If you'd rather see the number of distinct words, you can right-click the
SUM(word_count) icon and change the aggregation to
CNT(word_count) via the Measure submenu. Remember that each row in
the underlying table has a single word and the number of times it appears in
a particular corpus. The sum is the total number of words in the corpus; the
count is the number of different words.
Now add another dimension to the table (or actually, another measure).
Drag the corpus_date measure to the Color box in the Marks window.
This tells Tableau to let the color of the bar be proportional to the value
of that measure. A darker bar will correspond to a later date, a lighter
one will correspond to an earlier one. Because corpus_date doesn't vary
independently for a particular corpus (for example, all records for Hamlet
will have the same corpus dateā€”the date that Hamlet was published), the
 
Search WWH ::




Custom Search