community
cancel
Showing results for 
Search instead for 
Did you mean: 
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Weekly Challenge
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Unable to display your progress at this time. Please try again a little later, or contact an administrator if you continue to see this error.

Challenge #120: Popular Baby Names

Sr. Instructional Designer
Sr. Instructional Designer

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. 

 

 

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

Sr. Instructional Designer
Sr. Instructional Designer

@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!

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!

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
Asteroid

Done!

 

Spoiler

 

Capture.JPG

 

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

Atom

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

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.

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