0% found this document useful (0 votes)
31 views

Data Visualization Assignment 1

The document provides instructions for creating various charts in Tableau: bar charts, scatter plots, box plots, and doughnut charts for numerical data; line charts, area charts, heat maps, and time series forecasts for time series data. It also includes steps for formatting date fields and creating Gantt charts and donut charts using the Superstore dataset.

Uploaded by

Aashi Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

Data Visualization Assignment 1

The document provides instructions for creating various charts in Tableau: bar charts, scatter plots, box plots, and doughnut charts for numerical data; line charts, area charts, heat maps, and time series forecasts for time series data. It also includes steps for formatting date fields and creating Gantt charts and donut charts using the Superstore dataset.

Uploaded by

Aashi Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Data Visualization Assignment 1

Aashi Sharma- 22020440


Aakshi Sharma-22020638
Aazar Abrez- 22020357
Akshayaa SD- 22020175
Ansh Chawla- 22021005

Q1) If your manager tasks you with creating visually appealing charts or graphs for an
upcoming client presentation, specifically for two types of data: (a) Numerical data and
(b) Time series data, outline four distinct charts for each data type, totalling eight
charts. Alongside each, provide concise instructions on how to construct them in
Tableau. Additionally, incorporate hand-drawn illustrations for better clarity.

Ans. 1)

a) Numerical Data Charts:

1. Bar Chart:
- Tableau Steps:
1. Drag the numerical variable to Rows.
2. Drag the categorical variable to Columns.
3. Adjust the marks card to Bar.

2. Scatter Plot:
- Steps:
1. Place both numerical variables on the Axes.
2. Customize points with additional dimensions if needed.

3. Box-and-Whisker Plot:
- Steps:
1. Drag the numerical variable to Rows.
2. Add categorical variable to Columns.
3. Change the mark type to Box Plot.

4. Doughnut Chart:
- Steps:
1. Drag the numerical variable to the Columns shelf.
2. Drag a dimension to the Detail card.
3. Create a calculated field for the percentage.

b) Time Series Data Charts:

1. Line Chart:
- Steps:
1. Place the time variable on the Columns shelf.
2. Drag the numerical variable to Rows.
3. Change the mark type to a line graph.

2. Area Chart:
- Tableau Steps:
1. Drag time to Columns and the numerical variable to Rows.
2. Change the mark type to Area.

3. Heat Map:
- Tableau Steps:
1. Place time and a categorical variable on Rows and Columns.
2. Drag the numerical variable to the Color shelf.

4. Time Series Forecast:


- Tableau Steps:
1. Drag the time variable to Columns and numerical to Rows.
2. Choose "Analytics" from the left sidebar and then select "Forecast."

Q2) In the context of the Sample Superstore dataset, focus on the ship date associated
with each order. The task at hand is to transform these ship dates into a specific format
given below, and you are expected to achieve this using both the IF and CASE
statements separately.

Ans2. Using IF Statement:

1. Create a Calculated Field:


- Go to the Data pane.
- Right-click and choose "Create Calculated Field."
- Name it "Formatted Ship Date (IF)."
- Use the following formula:

```tableau

IF LEN([Ship Date]) = 10 THEN


MID([Ship Date], 4, 2) + "-" + MID([Ship Date], 1, 2) + "-" + MID([Ship Date], 7, 4)

ELSE
MID([Ship Date], 4, 2) + " " +
DATENAME('month', DATE(DATETRUNC('month', DATEPARSE("yyyy-MM-dd",

MID([Ship Date], 4, 7)))))+


" " + MID([Ship Date], 1, 4)

END
```

### Using CASE Statement:

Create 3 separate calculated fields.

Variable day- SPLIT (STR([Ship Date]),'-',1)


Variable month- SPLIT (STR([Ship Date]),'-',2)
Variable year- SPLIT (STR([Ship Date]),'-',3)

Again, create a calculated field called Monthname:

CASE [month]
WHEN '1' THEN 'January'
WHEN '2' THEN 'February'
WHEN '3' THEN 'March '
WHEN '4' THEN 'April'
WHEN '5' THEN 'May'
WHEN '6' THEN 'June'
WHEN '7' THEN 'July'
WHEN '8' THEN 'August'
WHEN '9' THEN 'September'
WHEN '10' THEN 'October'
WHEN '11' THEN 'November'
WHEN '12' THEN 'December'
END

Finally, create a calculated field of variable day+ month name+ Variable year.

[Variable day] +" "+ [Monthname]+" "+ [Variable year]

Q3) Provide instructions or steps for creating a Gantt chart and a Donut chart using the
Sample Superstore dataset. Additionally, include hand-drawn illustrations for each
chart to visually demonstrate the process.

Ans3.) #Gantt Chart:

1. Drag and Drop:


- In Tableau, open your Sample Superstore dataset.
- Drag the "Order Date" field to the Columns shelf.
- Drag the "Sales" field to the Rows shelf.

2. Convert to Gantt:
- Right-click on the "SUM(Sales)" pill on the Rows shelf.
- Choose "Gantt Bar" under the "Show Me" menu.

3. Adjust Formatting:
- Click on the "Size" shelf and adjust the size of the Gantt bars as needed.
- Format the date axis to display months or days, depending on your preference.

4. Final Gantt Chart:


- Your Gantt chart is ready! The length of each bar represents the duration between the
order date and the delivery date.
#Donut Chart:

1. Create Calculated Field:


- Go to the Data pane.
- Right-click and choose "Create Calculated Field."
- Name it "Dummy Field" with the formula `1`.

2. Build Donut Chart:


- Drag the newly created "Dummy Field" to the Rows shelf.
- Drag the dimension you want to visualize (e.g., "Category") to the Color shelf.
- Change the mark type to Pie.

3. Adjust Size:
- Drag "Dummy Field" to the Size shelf.
- Adjust the size slider to create a hole in the centre, forming a donut.

4. Final Donut Chart:


- Your Donut chart is ready! Each colour represents a category, and the size of the segments
corresponds to the measure (e.g., "Sales").

You might also like