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.
Announcement | Get certified today - take the Alteryx Designer Core and Advanced exams on-demand now!

Challenge #45: Parsing Bureau of Labor Data

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.

Community Data Engineer
Community Data Engineer

Here's a solution:

Solution.PNG

Quasar
Quasar

Here is another route:

parse txt file.png

Nebula
Nebula

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...

 

 

Magnetar
Magnetar

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
Pulsar
Spoiler
Spoiler:
image.png
Alteryx Certified Partner

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
Alteryx Certified Partner

Here's my solution.  Fun parsing challenge.

 

Spoiler
challenge-45.png
Alteryx Certified Partner

Solution Attached

Spoiler
Capture.PNG

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