Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

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 #120: Popular Baby Names

ChristineB
Alteryx Alumni (Retired)

A solution to last week's Challenge can be found here! 

 

A big thanks to those of you that joined us last week at Inspire for the Weekly Challenge session!  It was so much fun solving with you all! 

 

This week, we're identifying the most popular baby names that were registered between the years of 1880 and 2017.  Given the provided dataset, determine the most popular names for Males and Females for each available year.  The column "Field_1" contains three concatenated values: the name, the associated gender (Male or Female) and the number of occurrences that the name appeared in birth records.   The column "FileName" contains the name of the file in which the record is found; the data was read in from a zip file that contained text files for each year (1880-2017) of records. 

 

 

NicoleJohnson
ACE Emeritus
ACE Emeritus

Hi @ChristineB! Can you upload an earlier version, by chance, or upload the workflow and YXDB separately? I am unable to download the package since I am not on the same/latest version as you... usually I can do this fine with separate files, but the YXZP package won't let me... :( Need my Monday Weekly Challenge fix to help me combat these post-Inspire blues!! Thanks!

 

NJ

ChristineB
Alteryx Alumni (Retired)

@NicoleJohnson, no problem, and thanks for the heads up!  I uploaded the start file (.yxmd) and the input file (names.yxdb) to the original post.  That should get the ball rolling!

bdaniels
8 - Asteroid

 

Had the same issue as Nicole (congrats on the Grand Prix btw!), was able to circumvent by changing the extension to .zip

 

Spoiler
Screen Shot 2018-06-11 at 11.34.50 AM.png

Looking forward to seeing some more elegant solutions!

patrick_digan
17 - Castor
17 - Castor

I decided to go for the least number of tools that yielded the correct answer.

 

Spoiler
...but using a regex_replace formula is pretty slow. A text to columns approach would be much faster although it would require an added formula or select tool. I didn't have to sort the data since it appeared to already be in order.
Capture.PNG
kcgreen
8 - Asteroid

Done!

 

Spoiler

 

Capture.JPG

 

NicoleJohnson
ACE Emeritus
ACE Emeritus

My solution! Looks about the same as all three already submitted by @kcgreen@patrick_digan, and @bdaniels... there was probably a more dynamic way to get the names & counts in their respective gender columns, but this seemed far cleaner than whatever that method would be... so I feel like I'm in great company. :)

 

And thanks for the cheers, @bdaniels! :)

 

Spoiler
WeeklyChallenge120.JPG

Cheers,

NJ

sudhar46
7 - Meteor

Please find the attached Solution Using Running Tool functionSolution Challenge 120.PNG

jennifercook
5 - Atom

Looks like I did a little different than the others with a unique tool.  Sample tool makes sense too, now looking at the other answers.

AlexGeoffL
5 - Atom

It looks like I used the same approach to many. How unoriginal of me :) 

 

Spoiler
6-11-2018 2-16-14 PM.jpg

 

Thanks!

-Alex