top of page
Search

# Business and Data Analytics with Tableau | Practice Exercises-1

Exercise 1

Table of content:

• Intro to interface

• Importing

• Dimensions and Measures

• Chart types

• Finding the story

You are a reporter for a Metro Daily News (MDN) organization and you cover local politics. You have just downloaded data showing how much each local governmental agency (entities) in the state has paid for lobbyists to go to the state capitol and work for their causes. You feel this is not right!

You think there’s a story here, but you’re not sure what it is. You want to explore the data to understand if there is anything to it.

Requirement Details

1. Which government entity paid the most in compensation to lobbyists?

2. What is the total sum of lobbying (expenses + lobbying) is done by the tribes? Display a treetop chart for this answer.

3. Describe any other findings from the data? As a reporter, what else can you tell from this data?

Getting Started

The first thing you see is a mostly blank window. That can be intimidating.

But connecting or importing data into Tableau is easy, especially if the data is clean – has the information in rows and columns and without errors.

Tableau guides you with connecting to or importing data. On the left-hand side of the screen you will see the Connect bar.

The choices for the data types you can use in Tableau are listed under Connect.

What do they all mean?

Connecting to that lobbying data

The connections window in Tableau has several features.

• On the left are the connections to data sets.

• When you click on the data type, Tableau will open a dialogue box where you can browse to the file you want.

• Drag Sheet 1 (or double click) to select the file, it will appear in the top screen and the rows and columns associated with that data will appear in the bottom screen.

• And on the very bottom, toward the left, if you click on Sheet 1 you will go to the Tableau workbook where you can begin to analyze the data.

Who is paying those lobbyists?

Dimensions are typically those columns or fields that are text or that you are not going to do math on. So the name of the entity (local government) and the entity type are dimensions.

Dimensions/Tables are typically:

• Discrete data, not continuous as in numbers, but there is an exception: date fields are dimensions.

• Another type of dimension that has numbers in it is a zip code. You aren’t going to add up zip codes, but you might want to know how many time each zip code appears in the data.

• Finally, information that can be mapped like city, county and state (geographic data) are also dimensions

Let’s figure out what’s going on here.

Measures are data you can calculate, so the compensation and expenses are measures. Measures are continuous data.

• Continuous data: quantitative data that can be measured in some way.

• In this class, the number of students is discrete data. There cannot be half of a student.

• The age of each student is continuous data. It can be any age (within the range of possible human age)

When you hover over one of the Dimensions or Measures, they will be highlighted. I call those pills.

You can double click on the pills or drag and drop them to visually explore the data.

Let’s try and see how this works.

Double click on the Entity Type pill first (on Tables).

Double Click on the Compensation pill (on Measures).

1. You may have noticed that after dragging out the pills for Entity Type and Compensation, A table with Entity Types and amounts of Compensation is displayed.

2. On the “Show Me” tab on the right corner, Tableau guessed a bar chart made the most sense (highlighted in red). The software is smart like that. Click on the bar chart icon to transform the table on 1. above to a bar chart.

3. I also hovered above the title Compensation on x-axis and and sorted the data by clicking on the sort icon that appeared.

4. I hovered over the bars to see how much money each bar represented. That is the Tooltip (see screenshot above). You can try both sorting and hovering over the chart to see the Tooltip now using Entity Type.

5. Now, just drag those pills off the row and column and let go. The chart disappears. Try building a chart again, but this time use Entity instead of Entity Type.

Let’s do a calculation:

• On the menu bar at the top, select Analysis and then Calculated Field. Who is paying those lobbyists?

• Give your new calculated field a name: total-lobbying.

• Then type the calculation you want to do. Tableau offers guidance as you go along and will tell you if your calculation is valid at the bottom of the window.

In this case, we want to add the Compensation and the Expenses:

• Now, go ahead and create a bar chart, but with the total-lobbying field instead of compensation. Sort the graph. Which government spent the most? How much?

Using Entity Type, create a tree map showing the sum of total lobbying by type of government. List the entity types from highest to lowest. What is the sum total for the Tribes?

If you looking to hire expert which can help you to do your tableau data visualization and data analysis task then you can directly send your project requirement details at:

realcode4you@gmail.com