Database Reference
In-Depth Information
These types of normalized comparisons can make for much more interesting messages to
communicate. Luckily, they are quite easy to create in Tableau. We'll explore the first two in
this chapter, and the last two in the next.
Ratios
The data source itself may include a field that is a ratio, but most often the raw data includes
terms that an analyst needs to combine to create a ratio. Tableau can handle these types of
computations with Calculated Fields, in which new fields can be created by combining exist-
ing fields using a variety of operations. We introduced the concept in Chapter 2 , and now
we'll build on it.
Let's return to the DSNY data set to illustrate the technique, and we'll see if the ratio com-
parison is any more interesting than the absolute figures.
The data reported by DSNY includes three continuous Measures (quantitative fields) for
each community district:
RefuseTonsCollected
Amount of nonrecyclable garbage
PaperTonsCollected
Amount of recyclable paper
MGPTonsCollected
Amount of recyclable metal, glass, and plastic
The second two data types (paper and MGP) are both recyclable, and so can be summed to
create a new variable for each community district that we will call RecyclableTonsCollec-
ted to stay consistent with the provided nomenclature.
A comparison of the ratio of recyclable material to refuse would be interesting to consider, as
it would indicate which communities in New York City are doing a better job recycling.
First, we'll need to create a new calculated field that sums the two recyclable fields. Right-
click anywhere in the lefthand Dimensions or Measures panels, and select Create Calculated
Field . Then, fill out the resulting dialog box, as shown in Figure 4-1 .
Search WWH ::




Custom Search