2023: Week 41 - An International School

 Created by: Adrien Sourdille

This fundamental tableau prepping challenge comes from DS38 - Adrien Sourdille. Over to Adrien to explain the challenge:


“Because I studied in a bilingual school, I grew up in an international environment where my classmates had very varied origins. The number of nationalities represented in my classroom always baffled me and is the inspiration for this challenge.”


Your task is to group students by nationality and figure out what nationality is the most represented within each classroom.


Input

Two csv files:

1. Student Name



2. Student Nationality

Requirements

  • Input Data 1 and Input Data 2

  • Join both datasets on the Student ID (p.s. you shouldn't always listen to the requirements :) )

  • Group Values by Spelling to get rid of spelling mistakes in the Nationality field

  • Aggregate the dataset to get a count of students within each Nationality and classroom

  • Create a calculated field to output the Rank of each Nationality by classroom in descending order. Follow this blog to learn how to rank in Tableau prep.

  • Filter the Dataset to keep the first-ranking Nationality in each classroom

  • Remove unnecessary fields 

  • Output the data

Output


3 data fields:
  • Nationality 
  • Classroom
  • Name
2 rows (3 including 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

2023: Week 1 The Data Source Bank

2023: Week 2 - International Bank Account Numbers

How to...Handle Free Text