Weekly Challenge

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

We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!

Submit Feedback
We've recently made an accessibility improvement to the community and therefore posts without any content are no longer allowed. Please use the spoiler feature or add a short message in the message body in order to submit your weekly challenge.

Challenge #54: Data Prep Address Parsing

Highlighted
7 - Meteor

I used this challenge to get to grips with how to use Google's Geocoding API to download address information. Great practice and a shoutout to @mceleavey whose step-by-step guide is perfect.

Spoiler
Solution.png
Highlighted
8 - Asteroid

Thanks for the challenge! Here is my solution:

Highlighted
Alteryx Partner

Added a filter to highlight addresses w/o a zip

Spoiler
jatterberry_0-1589235739909.png

 

Highlighted
Alteryx Partner

Spoiler

Highlighted
Alteryx Partner

Number 13

Had to use words like St, Street, Ave etc to get the city name

Spoiler
sumanthskumar_0-1589714366787.png

 

Highlighted
8 - Asteroid

Hi,

 

Sharing my solution.

 

I saw that there are much more efficient ways of doing this but I will stay with my solution. 

 

Spoiler
Challenge_54_Emil_Kos.PNG
Highlighted
Alteryx Partner

My solution, from a while ago

Highlighted
8 - Asteroid

Loved this challenge! I don't know how to use Regex formulas, so I used "normal" formulas.

 

Spoiler
Challenge_54_edavilac.PNG
I used 4 formulas:

ZIP Code:

IF EndsWith([Address Text], "0") OR
EndsWith([Address Text], "1") OR
EndsWith([Address Text], "2") OR
EndsWith([Address Text], "3") OR
EndsWith([Address Text], "4") OR
EndsWith([Address Text], "5") OR
EndsWith([Address Text], "6") OR
EndsWith([Address Text], "7") OR
EndsWith([Address Text], "8") OR
EndsWith([Address Text], "9")
THEN Right([Address Text], 5)
ELSE Null()
ENDIF

State
IF IsNull([ZIP Code])
THEN Right([Address Text],2)
ELSE ReverseString(Substring(ReverseString([Address Text]),6,2))
ENDIF

City (Part 1)
IF IsNull([ZIP Code]) THEN
ReverseString(GetWord(ReverseString([Address Text]), 2))+" "+ReverseString(GetWord(ReverseString([Address Text]), 1))
ELSE
ReverseString(GetWord(ReverseString([Address Text]), 3))+" "+ReverseString(GetWord(ReverseString([Address Text]), 2))
ENDIF

City (Part 2)
IF StartsWith([City], "Street ")
THEN TrimLeft([City],"Street ")
ELSEIF
StartsWith([City], "St ")
THEN TrimLeft([City],"St ")
ELSEIF
StartsWith([City], "Ave ")
THEN TrimLeft([City],"Ave ")
ELSEIF
StartsWith([City], "Avenue ")
THEN TrimLeft([City],"Avenue ")
ELSE
[City]
ENDIF

 

 

Highlighted
11 - Bolide
Spoiler
 
Highlighted
8 - Asteroid