top of page
realcode4you

Tableau Project Help, Tableau Homework Help | Tutorial-2


Complete A Set of Training Videos on Tableau


Step 1: Click the “down arrow” next to “Getting Started”

Complete the videos that are marked below.



Step 2: Click the “down arrow” next to “Calculations”

Complete the videos that are marked below.


Complete the videos that are marked below.



Step 3: Reform Data for Tableau

You will have to reformat the data in NYCTrash.xlsx. One of the great challenges in any analytical situation is formatting data that you find from multiple sources and placing it in a format that Tableau (or any tool) expects. The NYCTrash data currently is in a “wide” format:




You will need to recreate the data in a “long” format.



Note that there are now THREE rows for each row in the original data, and the fields for the different kinds of trash have been placed one on each row. If you are an Excel ninja, you can do this with code, but it’s likely just as fast to do this with copy/paste, and copy/paste special → transpose.


HOWEVER – Tableau has a pivot function -> use this to shift the data to long format.


Step 4: Build a visualization that shows rank order of total trash collected by borough. It should look something like this:



Step 5: Create a Calculated Field to create an “IsRecycling” Field

Create a new calculated field, and use the IF THEN ELSE function structure to create a field that contains the value 1 if the category is MGPTonsCollected or PaperTonsCollected, and 0 if the category is RefuseTonsCollected. You will need to ensure that your field is “discrete” and is a “dimension”.


For help – google “Tableau If Then Else”


Step 6: Create a new “Recycling vs. Refuse” chart.

Create a SECOND visualization (duplicate the first sheet) display green if the material collected is recycling, red if not. Your visualization should look like this. ( You will need to use the new dimension you created in Step 5)



Step 7: Create a new calculated field that computes “Per Capita” refuse totals.

Download and add the NYCPopulation.xlsx file to your data (you learned about using multiple files in the videos in step 1). Ensure you create the relationships between the tables correctly.



Create a New Calculated field called “Per Capita Amount” that divides the amount collected by the population value. Then, duplicate the previous sheet, and add the new field as a new column. Your visualization should look like this:



Step 8: Create a “Percent” Representation of the ratio of Recycled to Refuse Collected.

Create a New Sheet, and Create a Column Chart with a Column for each borough. Color by “IsRecycled” – Your Graph will look like the graph below on the left. Now, using a table calculation, display the data as a percent ratio. Your graph should change to look like the graph on the right below.














NOTE: To complete this step, you will need to use the table calculation for “Percent of Total”, and “Compute using Cell”. In addition, we will expand this exercise a great deal when we learn about Level of Detail Expressions


Step 9: Submit File




Hire Us to get help in any tableau related topics:


Contact Us:

realcode4you@gmail.com

Comments


bottom of page