8. TRI dataset & Table Calculations

Time to merge in one more dataset. This time, choose the TRI_2014_US csv file and join FRS ID from the GHG data to the FRS ID in the TRI data.

Now, start a new worksheet. Our question is: How much of each chemical is released per US region? Can we explicitly rank the regions? It might make sense to do this as a table, rather than a graph. (though the process in Tableau is the same.)

Let’s drag the new “Chemical” Dimension onto the Rows shelf. Then add the “Regions” Dimension onto the Columns shelf.

Well, that’s not quite what we might expect. The “Abc” in each cell just indicates that there is potentially a value for that cell. Remember, we haven’t added any Measures, so Tableau has no idea what number to display. For our purposes, we’ll want the “Total Releases” Measure as Mark Text:

Also, SUM of total regions might not make sense comparatively, as the regions have a different number of facilities. Let’s AVG instead.

That's better. That’s the sum of each chemical released (in 2014) per region.

Let’s click the Sort Descending button on the top ribbon.

In this case, we want to Rank the “AVG Total Releases”, across the table. (I will also exclude the “Other” region, so we’re just looking at the continental US)

Now that’s a pretty cool table. We can spruce it up a bit more with some Tableau features, though. Namely, we can use a color gradient to rank the regions’ chemical releases, per chemical. We’ll use a table calculation for this.

8.1. What are table calculations? How to use them?

We want to rank regions based on their “Total Releases”, so click on the “Total Releases” on the Marks shelf and add a table calculation:

This gets us close to what we want, but we’ve lost the actual numbers. Let’s drag the table calculation to Color:

more steps...

8.2. we could also go back to our histograms and put in a cumulative line

For this, we need to drag the “Reported CO2e emissions” Measure onto a secondary axis. You actually need to drag it to the far right of the chart area until you see a dotted line:

Then, add a table calculation to the secondary axis Measure:

We need to do a running total, across the table. Then, add a secondary calculation that calculates the percent of total, across the table. (what would happen if we did percent of total across the pane?)

Finally, change the mark type of just the secondary axis to a line: