2022: Week 2 The Prep School - Birthday Cakes

 Created by: Carl Allchin

Welcome back for week two. The first four challenges this year are aimed at people getting used to the fundamental skills of data prep (or maybe using the challenges to learn a new tool / language). 

Last week, we introduced you to The Prep School by having you help us create a nice data set with the contact details of the parents of our pupils. This week we are working on a very different problem that you might not find a piece of cake!

The Prep School loves any excuse to buy a cake to celebrate and what is better than celebrating one of our student's birthdays? This sounds easy until you realise we have 1,000 students and what do we do about those who's birthday are on a weekend day? We can't have them miss out. 

Input

This week's input is the same as Week One's. You can download a copy here if you don't already have one. 

Requirements

  • Input the data set
    • Removing any unnecessary fields (parental fields) will make this challenge easier to see what is happening at each step
  • Format the pupil's name in First Name Last Name format (ie Carl Allchin)
  • Create the date for the pupil's birthday in calendar year 2022 (not academic year) (link)
  • Work out what day of the week the pupil's birthday falls on (link)
    • Remember if the birthday falls on a Saturday or Sunday, we need to change the weekday to Friday
  • Work out what month the pupil's birthday falls within
  • Count how many birthdays there are on each weekday in each month (link)
    • Note: there is an issue with my output as I use the birthday month rather than the 2022 date of the birthday (thanks Rosario). Output updated 17/1/22 9:45 PM GMT)
  • Output the data

Output


The output has:
6 data fields:
  • Pupil's Name
  • Date of birth
  • This Year's Birthday
  • Month
  • Cake Needed On
  • BDs per Weekday and Month
You can download the full outputs 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

2023: Week 1 The Data Source Bank

2023: Week 2 - International Bank Account Numbers

How to...Handle Free Text