2023: Week 1 The Data Source Bank

 Created by: Carl Allchin

Welcome to a New Year of Preppin' Data. These are weekly exercises to help you learn and develop data preparation skills. We publish the challenges on a Wednesday and share a solution the following Tuesday. You can take the challenges whenever you want and we love to see your solutions. With data preparation, there is never just one way to complete the tasks so sharing your solutions will help others learn too. Share on Twitter, LinkedIn, the Tableau Forums or wherever you want to too. Tag Jenny Martin, Tom Prowse or myself or just use the #PreppinData to share your solutions. 

The challenges are designed for learning Tableau Prep but we have a broad community who complete the challenges in R, Python, SQL, DBT, EasyMorph and many other tools. We love seeing people learn new tools so feel free to use whatever tools you want to complete the challenges. 

A New Year means we start afresh so January's challenges will be focused on beginners. We will use different techniques each week to help you develop your skills. In February, we will set the challenges at an intermediate level and then in March we will do some advanced challenges. January's challenges will have links to useful videos and blogposts to help you learn a technique if it is new to you. 

The subject for January will be our new (fake) bank -- The Data Source Bank (DSB). This week we have had a report with a number of transactions that have not just our transactions but other banks' too. Can you help clean up the data?

Input

One csv to input this week. You can download it here


Requirements

  • Input the data (help)
  • Split the Transaction Code to extract the letters at the start of the transaction code. These identify the bank who processes the transaction (help)
    • Rename the new field with the Bank code 'Bank'. 
  • Rename the values in the Online or In-person field, Online of the 1 values and In-Person for the 2 values. 
  • Change the date to be the day of the week (help)
  • Different levels of detail are required in the outputs. You will need to sum up the values of the transactions in three ways (help):
    • 1. Total Values of Transactions by each bank
    • 2. Total Values by Bank, Day of the Week and Type of Transaction (Online or In-Person)
    • 3. Total Values by Bank and Customer Code
  • Output each data file (help)

Output

Output 1: Total Values of Transactions by each bank


Two data fields:
  • Bank 
  • Value
3 rows of data (4 including field headers)

Output 2: Total Values by Bank, Day of the Week and Type of Transaction


Four data fields:
  • Bank
  • Online or In-Person
  • Transaction Date
  • Value
42 rows of data (43 including field headers)

Output 3: Total Values by Bank and Customer Code


Three data fields:
  • Bank
  • Customer Code
  • Value
33 rows of data (34 including field headers)

You can download all the outputs 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 2 - International Bank Account Numbers

How to...Handle Free Text