We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!Submit Feedback
Piece of cake. This was a fun challenge!
My results matched the provided answer:
S. VETTEL 281
F. ALONSO 191
J. BUTTON 187
This challenge probably underscores for me the importance of DOMAIN KNOWLEDGE when solving a challenge. More in the spoilers below!
This had 4 stages, and a couple of GOTCHAs!
Gotcha 1: Low laptime is != good. Sometimes low laptime = bad.
I originally did a bit of data exploration when I first got the dataset and I noticed that ranking the drivers by the "Sum of their total lap times in the races" showed some interesting outliers: one driver had a Zero laptime! And if you thought "low lap time = good" the you'd have assigned this 0 laptime driver the 1st place!
Gotcha 2: Not all drivers finished their races.
When doing my data exploration I noticed that not all drivers had the same number of "Max number of laps per race", meaning some bailed from the race partway through. And you can't assign those drivers who bailed a place at the podium ... cos you have to finish the race to qualify for podium!
1. Filter for drivers who actually finished
I used a Join tool and a Filter to split out which drivers participated and completed each of the races.
2. Rank the drivers in ascending order of race time
And then I listed the drivers from 1 to 10, in their finishing positions.
3. Grab the scores from the other file, and Join
I took the scores on the Right and Joined it to the rank of drivers in the Left.
4. Filter for the Top 3 podium winners
And voila, sum their scores and filer for the Top 3.