2023: Week 20 - Dining Hall Debacle

Created by: Trea McElhone

At the Prep School, the lunch menu is extensive. However at the latest PTA (Parent Teacher Association) meeting some parents were grumbling about the range of dietary preferences offered by the school’s dining hall menu. They seemed to suggest that there aren’t enough vegetarian or vegan options for their kids, and they also complained that the vegan & vegetarian options offered are more expensive than the meat-based options. 


The principal was quick to reassure them that this was not the case - however perhaps too quick, as they had yet to check the stats! 


This is where you come in, as the PTA insisted on getting some fact based info and they want it pretty soon. As such, in this week's challenge, your task is to help the Prep School understand what percentage of meal options on its menu are vegan, vegetarian , or meat-based, as well as the average price for each meal type.

Input

Input 1: Meal Prices

Input 2: Nutritional Information

Requirements

  • Input both data sources from here

  • Group meal types 

    • Hint - veggie and vegetarian are the same type 

  • Join the data sets together so you have the meal type and price for each meal 

  • Remove the irrelevant fields

  • Aggregate the data by meal type and average their price

  • Calculate the percentage of total for each meal type 

    • Hint - this blog post is helpful for this step

  • Rename the fields to match the output data example 

  • Output the data as a CSV

Output


3 Fields 

  • Type 

  • Average Price 

  • Percent of Total 

3 rows (4 including headers)


You can download the output here.


After you finish the challenge make sure to fill in the participation tracker, then share your solution on Twitter using #PreppinData and tagging @TreaMcElhone, @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