2024: Week 33 - The Prep School Birthday Cakes part 2

 Created by: Carl Allchin

When teaching at The Data School, I love it when people ask a question that spurs a Preppin' Data challenge. 

This week we'll use the same input dataset as we first used in the early weeks of 2022. This time we're looking at adding in the school term dates to further the initial birthday cake challenge. If you want to go back and do the original challenge then there is a link here.

This challenge is based on the School Year dates of schools in the county of Essex in the UK. 'Terms' describe when children go to school.

Inputs

There are two inputs this week. One dates back to the 2022 challenge and a new data set to enable you to complete the challenge:




Requirements

  • Input the data sets 
  • Determine each student's birthday for this school year
    • The school year starts on 1st September and ends on 31st August the following year
  • Create a Cake Day field that shows when the school needs to buy each student a cake to celebrate their birthday. The Cake Day rules are:
    • If you birthday falls on a school day, you will receive cake on that day
    • If your birthday falls on a Saturday or Sunday, you will receive a cake on the Friday before that weekend
      • You might notice the 1st Sept is a weekend day so those kids will have received their birthday cake in the previous school year.
    • If your birthday falls on a day during a holiday, you will receive your cake on the last Friday in the previous school term
  • Count how many cakes are needed for each school day and what day of the week that day is. 
  • Output the data set

Output


3 fields:
  • Cake Needed On Date
  • Cake Weekday
  • Count of Cakes
186 rows (187 rows incl. header)

You can view the output here.

After you finish the challenge make sure to fill in the participation tracker, then share your solution on Twitter or LinkedIn 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