Skip to content

Commit

Permalink
Tableau part 1 (#104)
Browse files Browse the repository at this point in the history
* fixing up part 1

* finished part 1
  • Loading branch information
johncfrauen-lc101 authored Oct 7, 2024
1 parent 815e83e commit 1f0cbc3
Show file tree
Hide file tree
Showing 2 changed files with 180 additions and 18 deletions.
29 changes: 19 additions & 10 deletions content/tableau-part-one/exercises/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,34 @@ As you work on each of your sheets, think about a descriptive name that you woul

### Sheet 1: Total of Movies vs TV Shows

The first worksheet will contain a a total count of Movies and TV Shows.
The first worksheet will contain a a total count of Movies and TV Shows. We will display this information in a horiztonal bar chart.

1. Drag and drop the `Show Id` pill into the `Rows` shelf.
1. Drag and drop the `Show Id` pill into the `Columns` shelf.
- Convert it to a measure of `Count`
1. Add the `Type` pill to the columns shelf.
1. Lastly, add the `Rating` pill as a `Color` within the `Marks` card to provide some additional detail on the Movies and TV Shows.
1. Add the `Type` pill to the `Rows` shelf.
1. Add the `Rating` pill as a `Color` within the `Marks` card to provide some additional detail on the Movies and TV Shows.
1. Finally, in the Marks section, click the dropdown and select the `Bar` option to ensure our Viz presents the data as a bar chart.
1. Right click the Sheet tab and use the *Rename* option to rename the sheet to this: `Total Count of Movies and TV Shows`


This provides a visual of how many Movies vs TV Shows there are within the given years, and how many Movies and TV shows exist within all available ratings.

### Sheet 2: Release Year and Type

The second worksheet will contain a line graph displaying how many Movies and TV shows were released in the available years.

1. Drag and drop the `Release Year` pill into the columns shelf.
1. Drag and drop the `Release Year` pill into the `Columns` shelf.
1. Add the `Show Id` pill into the rows shelf and convert it to a measure of `Count`.
1. Add the `Type` pill as a `Color` within the `Marks` card to display both Movies and TV Shows, and when how many of each were released per year.
1. For this viz, we can stick with the `Automatic` viz option in the Marks section. This should render our data as a multi-line chart.
1. Right click the Sheet tab and use the *Rename* option to rename the sheet to this: `Release Years of Movies and TV Shows`

### Sheet 3: Popular Genres

The third and final worksheet that you will create for your dashboard is going to display popular genres among the Movies and TV Shows.

1. Drag and drop the `Show Id` pill into the Marks card as a `Color`.
1. Add another `Show Id` pill into the Marks card as a `Size`.
1. Drag and drop the `Show Id` pill into the Marks card as a `Color` and convert it to a measure of `Count`.
1. Add another `Show Id` pill into the Marks card as a `Size` and convert it to a measure of `Count`.
1. Add the `Listed In` pill into the Marks card as a `Label`.

This is a bit too granular for a dashboard as there are many boxes that do not display a label for the associated genre. Let's apply some minor conditional filtering to the `Listed In` pill.
Expand All @@ -48,27 +53,31 @@ This is a bit too granular for a dashboard as there are many boxes that do not d
- Click on filter
- Click on the *Condition* section
- Click *By Field*
- For the `Field`, select `Listed In`. For the `Aggregation`, select `Count`
- Under the *Comparison* section select the `>=` option and add `128` as the *Value*.
5. Right click the Sheet tab and use the *Rename* option to rename the sheet to this: `Popular Genres`

{{% notice blue Note "rocket" %}}
You will learn more about filtering in the next Tableau lesson, but this serves a brief introduction!
{{% /notice %}}

### Create a Dashboard

We are introducing dashboards to you now so that you can easily publish your work, but you should know that there are best practices for dashboards that you will cover in a later chapter.
We are introducing dashboards to you now so that you can easily publish your work.

But, you should know that there are best practices for dashboards that we will cover in a later chapter.

Click on the `Dashboard` tab at the top of your workbook and click `New Dashboard` or click on the `New Dashboard` button on the bottom of your workspace.

1. Drag and drop your existing `Sheets` into the dashboard view.
1. From inside the `Dashboard` view pane on the left side of the window, under the `Sheets` section, drag and drop your existing `Sheets` into the dashboard view.

{{% notice blue Note "rocket" %}}
Feel free to customize this any way you like!
{{% /notice %}}

## End Result

Your dashboard will most likely look similar to the following image:
If you didn't make any customizations after these steps, your dashboard should look similar to the following image:

![Completed dashboard for intro to tableau exercises](pictures/dashboard-example.png?classes=border)

Expand Down
169 changes: 161 additions & 8 deletions content/tableau-part-one/studio/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,171 @@ Please use your best judgment on the chart style, layout, and interpretation of
1. We will be using the [Mushroom Classification](https://www.kaggle.com/datasets/uciml/mushroom-classification) dataset from Kaggle. Download the CSV file.
1. Open Tableau Public and connect to your dataset.
1. Create visualizations for the following: (a sheet for each).
- How many Mushrooms are poisonous vs edible?
- How many different habitats were mushrooms collected from?
- How many Mushroom habitats compared to class?
- How many Mushrooms sorted by class and cap-color?
- [Create aliases](https://help.tableau.com/current/pro/desktop/en-us/datafields_fieldproperties_aliases_ex1editing.htm) for each letter in the chart from the above bullet point.
- Use the context provided in the dataset for what each letter represents.
- Explore the “Marks” card to add color or size to chart d based on the chart design you have chosen.
- Give your chart a new title.
- How many Mushrooms are poisonous vs edible (i.e. use the `Class` field)?
- How many Mushrooms were collected from each habitat?
- How many Mushrooms were collected from each habitat, grouped by their class?
- How many Mushrooms were collected for each cap-color, grouped by their class?
- Now for the chart you created above, [create aliases](https://help.tableau.com/current/pro/desktop/en-us/datafields_fieldproperties_aliases_ex1editing.htm) for each cap-color value that corresponds to its full name in the attributes list below.
- Explore the “Marks” card to add color or size to the chart based on the chart design you have chosen.
- Create your own chart with at least 2 dimensions and aliases to provide context.
- Create a dashboard with at least 2 of your sheets.
- Save and publish your dashboard.


**Notes about the abbrevations are available when looking at the "Detail" preview on kaggle, but have been listed below:**

- class:
- edible=e
- poisonous=p
- cap-shape:
- bell=b
- conical=c
- convex=x
- flat=f
- knobbed=k
- sunken=s
- cap-surface:
- fibrous=f
- grooves=g
- scaly=y
- smooth=s
- cap-color:
- brown=n
- buff=b
- cinnamon=c
- gray=g
- green=r
- pink=p
- purple=u
- red=e
- white=w
- yellow=y
- bruises:
- bruises=t
- no=f
- odor:
- almond=a
- anise=l
- creosote=c
- fishy=y
- foul=f
- musty=m
- none=n
- pungent=p
- spicy=s
- gill-attachment:
- attached=a
- descending=d
- free=f
- notched=n
- gill-spacing:
- close=c
- crowded=w
- distant=d
- gill-size:
- broad=b
- narrow=n
- gill-color:
- black=k
- brown=n
- buff=b
- chocolate=h
- gray=g
- green=r
- orange=o
- pink=p
- purple=u
- red=e
- white=w
- yellow=y
- stalk-shape:
- enlarging=e
- tapering=t
- stalk-root:
- bulbous=b
- club=c
- cup=u
- equal=e
- rhizomorphs=z
- rooted=r
- missing=?
- stalk-surface-above-ring:
- fibrous=f
- scaly=y
- silky=k
- smooth=s
- stalk-surface-below-ring:
- fibrous=f
- scaly=y
- silky=k
- smooth=s
- stalk-color-above-ring:
- brown=n
- buff=b
- cinnamon=c
- gray=g
- orange=o
- pink=p
- red=e
- white=w
- yellow=y
- stalk-color-below-ring:
- brown=n
- buff=b
- cinnamon=c
- gray=g
- orange=o
- pink=p
- red=e
- white=w
- yellow=y
- veil-type:
- partial=p
- universal=u
- veil-color:
- brown=n
- orange=o
- white=w
- yellow=y
- ring-number:
- none=n
- one=o
- two=t
- ring-type:
- cobwebby=c
- evanescent=e
- flaring=f
- large=l
- none=n
- pendant=p
- sheathing=s
- zone=z
- spore-print-color:
- black=k
- brown=n
- buff=b
- chocolate=h
- green=r
- orange=o
- purple=u
- white=w
- yellow=y
- population:
- abundant=a
- clustered=c
- numerous=n
- scattered=s
- several=v
- solitary=y
- habitat:
- grasses=g
- leaves=l
- meadows=m
- paths=p
- urban=u
- waste=w
- woods=d

## Submitting Your Work

When finished make sure to save and publish your work to your Tableau Public account. Copy the URL to your published Tableau project and paste it into the submission box in
Expand Down

0 comments on commit 1f0cbc3

Please sign in to comment.