2023: Week 42 - Prep School "Disco Fever"

Created by Zoe Reed

This challenge is part of the ongoing series related to “Prep” School provided by DS38.

The Prep School are holding a disco for Year 5 and 6. Each student has chosen a song they would like played – but the DJ will only play songs with 5 or more votes! Your challenge is to find out which songs are going to be played at the disco.

Input

Four different inputs:
1. & 2. are details for the students (one file for year 5 and one file for year 6)

3. & 4. are the details for song choices by the students (again one file for year 5 and one for year 6)

Requirements

Input the data

The organiser would like to join the student details to the students’ song choices – join Year 5 Contact Details to Year 5 Song Choices, and the same for the Year 6 datasets.

All the students need to be in the same table in order to count votes for each song. Use a Union step to combine the Year 5 data and the Year 6 data.

There are now two columns that describe which song each pupil has voted for (Song Recommendation and Song Choice) we would like this information to be all in one column.

Now we need to count how many pupils voted for each song in each year group.

Using a clean step, rename the Full Name column ‘Number of Votes’.

Finally, let’s see which songs made the cut. Using a clean step, filter the count of Full Name so that only songs with 5 or more votes are kept in the data set.

Output the data.

Output


3 data fields:
  • Number of Votes
  • Year Group
  • Song Recommendation
8 rows (9 incl. headers)

You can download the output from here.

After you finish the challenge make sure to fill in the participation tracker, then share your solution on Twitter using #PreppinData and tagging @Datajedininja@JennyMartinDS14 & @TomProwse1

You can also post your solution on the Tableau Forum where we have a Preppin' Data community page. Post your solutions and ask questions if you need any help! 

Popular posts from this blog

2024: Week 1 - Prep Air's Flow Card

2023: Week 1 The Data Source Bank

How to...Handle Free Text