Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #156: What Position Should You Play?

JamesMA
Alteryx Alumni (Retired)

A tough challenge, I feel there were too many specific cases to spot and make a replacement for based on different naming conventions.

 

Otherwise it was a cool idea.

jamielaird
14 - Magnetar

Here's my solution:

 

Spoiler
solution_156_JL.png
AbiramiJothi
7 - Meteor
Spoiler
156.PNG

The logic was challenging. Good one. Thanks!

kshashank03
7 - Meteor

I didn't get a chance to consider International reputation but I got to use RegEx for the first time (successfully) to parse out numbers and separate the headers from the scores in the Rating Coefficients for the second part of the challenge. This dataset is very interesting and I hope to use Tableau to make some visualizations with it. 

 

2019-04-07_18-19-24.png

ggruccio
ACE Emeritus
ACE Emeritus

Back from vacation and finally caught up! 

 

Back to Solving!

 

I ran this one using the CREW Expect Equal test and found some of the special characters in the names were turning into question marks (?) on my data...appears to be a font issue for me.

kelly_gilbert
13 - Pulsar

I'm neither a fan of soccer/football nor sports video games, so this was all pretty much gibberish to me at first (Goalkeeper vs. Sweeper?)  In the end, it was just a parsing and reshaping exercise!

 

 

Spoiler
First, I made a lookup table with the expected output and associated position names:

challenge_156_lookup_table.PNG


Step 2: transpose player and attribute data by player ID and position:
challenge_156_workflow1.PNG


Step 3: join player scores to attribute coefficients and calculate the total score
challenge_156_workflow2.PNG


Step 4: format the output table (I know this is overkill, but for some reason, I really dislike manually renaming/ordering lots columns in the Select tool! Also, in a production environment, this would allow for rearranging/renaming the output columns without having to adjust tools.)
challenge_156_workflow3.PNG

Finally, recreating the attribute table:

challenge_156_create ref table.PNG



Also, the only places where my solution does not match the provided solution is when players or teams have special characters in their names. The input player data has ? instead of special characters, while the solution table includes the special characters.
challenge_156_character issues.PNG

 

NicoleJohnson
ACE Emeritus
ACE Emeritus

My solution! 

 

Spoiler
I opted for the tougher challenge on this one, and might not have interpreted the rules correctly (I didn't really compare to the final output since I figured there would be differences)... but I felt like it was at least a semi-logical approach, and the numbers looked reasonable, so I just went with it :)

Couple things to call out: I noticed there were some skills/attributes in the FIFA player data that were not in the Ratings Coefficients data, so a few attributes were left out of my calculations. I also had to make some assumptions about what the "OVR" field was used for in comparison to the "Increase" field for the skills in the International Reputation table... I landed on (Value (of player skill) + Increase) * Coefficient), then summarized points by Position, then added OVR if present to the final position score. No idea if that is the correct formula, but the instructions were vague enough on that point that I figured it wouldn't make much of a difference.

WeeklyChallenge156.JPG

Cheers,

NJ

Kenda
16 - Nebula
16 - Nebula
Spoiler
Went with the basic route. My answer is off by a couple points on some players and some positions, but it looks closer than some others so I'm guessing it's okay

Capture.PNG
SeanAdams
17 - Castor
17 - Castor

Football - or as america calls it, "Soccer" (even though American Football also uses hands...)

Completed the primary challenge

 

Result.png

 

 

 

Spoiler

Here's the solution:

Solution.png

anaibeth
8 - Asteroid

I unfortunately had challenge 156.PNGto spend a couple hours on the "simple" version but i finally got it.