Descriptive Analytics with Pivot Tables Cont’d
2025-01-27
HW 2 is due Monday, 1/27/25
HW 3 is now posted and is due 2/3/25
In-class Polling (Session ID: bua345s25)
Question 1. Which movie in 2024 had the most days as the number one grossing film?
Question 2. How many days in 2024 was this movie at number one.
Worksheet 1 contains U.S. domestic flight data for November and December
How many PASSENGERS flew from San Francisco to Chicago, IL on UNITED?
Insert
> Table
):Question 3. How many CARRIERS (airlines) are included in the flights data set on Worksheet 1
Question 4. How many CARRIERS flew from San Francisco to Chicago?
Question 5. How many passengers flew on United from San Francisco to Chicago.
Question 6. What percentage of all passengers flying this route flew on United (in Worksheet 1).
HINT: Right click on the Sum of Passengers column and select the Show Values As
option, % of Column Total
.
Round answer to closest whole number.
Worksheet 2 also contains flight passenger data.
We want to know how many passengers on Southwest Airlines flew from anywhere in Illinois (IL) to anywhere in Pennsylvania (PA).
In order to answer this question, we have to first parse the ORIGIN / DESTINATION
in to four separate columns:
Select the ORIGIN > DESTINATION
column.
Click Text to Columns
on the Data
tab.
Specify Delimited
, default, in the pop-up and click next.
Update the column headers to be the following.
Question 7. How many passengers on Southwest Airlines flew from anywhere in Illinois (IL) to anywhere in Pennsylvania (PA).
Question 8. What percentage of all passengers flying between these two state flew on Southwest?
Show Values As
option, % of Column Total
.Worksheet 3 contains the Titanic data from previous lectures.
Note that all duplicates have already been removed.
We want to determine what percent of all survivors were under 10 years old.
Convert these data to an Excel Table (Insert
> Table
).
Click Summarize with PivotTable
.
Put the Pivot Table on the Existing Worksheet
in location H1
.
Start by setting up the Pivot Table Fields as shown.
Notice that this creates a column for each age which is not ideal.
Click on any of the column headers that you want to group.
Right-click and click Group in the menu that appears.
Complete the pop-up box as shown.
Question 9. How many survivors of the Titanic were under 10 years old?
Question 10. What percent all survivors of the titanic were under 10 years old?
Show Values As
option, % of Row Total
.Question 11. Children under 10 had the highest survival rate (percentage) of any age group. Which age group had the second highest survival rate (percentage)?
HINT: Switch the Show Values As
option, % of Column Total
.
When you are done, clear the Pivot Table fields.
Question 12. What was the average fare paid by 2nd class passengers on the Titanic?
Using Worksheet 4 which includes data from last week, you will answer the following question in HW 3.
Parse the ORIGIN-DESTINATION
column into two columns.
Convert the data to a table (Insert
> Table
)
Create a Pivot Table with
DESTINATION
in the Rows
fieldNO. OF PASSENGERS
in the Values
field.Pivot Tables
Pivot Tables with Slicers
Useful Facts from Today:
Parsing and Concatenating text should be done BEFORE creating an Excel Table.
PivotTable data can be presented as counts or percentages.
Sums can be presented as averages or ANY summary statistic to answer a question-
HW 2 was due Monday, 1/27/25 and HW 3 is due Monday, 2/3/25.
To submit an Engagement Question or Comment about material from Lecture 5: Submit it by midnight today (day of lecture).