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 #45: Parsing Bureau of Labor Data

GeneR
Alteryx Alumni (Retired)

 Thanks for your participation so far. If you would like to see the solution to last week's challenge, check it out HERE.

This week we will be using the download tool to pull some public employment data from the Bureau of Labor Statistics.  Once downloaded the data needs to parsed into the required format to prepare it for use.  I have also provided a snapshot of the input data if you have firewall issues accessing the data from the URL, you won't need it if you use the download tool.   If your results differ slightly in row content, the data may have changed at the URL…

 

Use Case:  The input data from the Bureau of Labor Statistics (http://www.bls.gov/web/empsit/compaes.txt) needs to be downloaded and formatted for analytics.  The data set details employee statistics that are adjusted seasonally.

 

Objective: Download the data from the URL then parse it to match the output shown in the sample output.

MattD
Alteryx Alumni (Retired)

Here's a solution:

Solution.PNG

Former Alteryx, Inc. Support Engineer, Community Data Architect, Data Scientist then Data Engineer
Joe_Mako
12 - Quasar

Here is another route:

parse txt file.png

SeanAdams
17 - Castor
17 - Castor

Similar solution approach as @MattD and @Joe_Mako

 

My results don't match perfectly though because the data on the website has moved on (i.e. 2015 vs. 2014 data)

:-) that took way too long to diagnose the problem with the results...

 

 

NicoleJohnson
ACE Emeritus
ACE Emeritus

My solution. 

 

Spoiler
RegEx for the win! Seriously my new favorite tool. Pretty sure my last 10 workflows have contained it in some shape or form... possibly whether they needed it or not.  Challenge #20 was fighting me on the RegEx front a couple weeks ago - might be time to go tackle again... :)

WeeklyChallenge45.JPG
estherb47
15 - Aurora
15 - Aurora
Spoiler
Spoiler:
image.png
LordNeilLord
15 - Aurora

This is probably the most tools I've used in a challenge so far...I'm not proud of myself But if it works...it works!

 

Spoiler
Weekly Challenge 45.png
jamielaird
14 - Magnetar

Here's my solution.  Fun parsing challenge.

 

Spoiler
challenge-45.png
nick_ceneviva
11 - Bolide

Solution Attached

patrick_digan
17 - Castor
17 - Castor
Spoiler
Capture.PNG

EDIT: I learned a lot from other's solutions on this one!