8. TRI dataset & Table Calculations

Time to merge in one more dataset. This time, choose the TRI_2014_UScsv 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 ofeach chemical is released per US region? Can we explicitly rank the regions? Itmight 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” ineach 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 todisplay. For our purposes, we’ll want the “Total Releases” Measure as MarkText:







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


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



 


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




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

8.1.  Whatare table calculations? How to use them? 

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










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


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


more steps...


8.2.  wecould 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 todrag 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 asecondary 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 toa line:



So, that's the basics of worksheets. Time to bring this all together in a dashboard.

SUBPAGES (10): 1. INTRODUCTION 2. CREATING 2-D GRAPHS 3. 3-D GRAPHS AND MORE! 4. MAPS 5. MERGE IN EIA POWER PLANT DATA 6. DOES THE AMOUNT OF ELECTRICITY GENERATED INFLUENCE GHG EMISSIONS? 7. CALCULATED FIELDS 7. CALCULATED FIELDS 8. TRI DATASET & TABLE CALCULATIONS 9. DASHBOARDS