Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.
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 #77: Extending Spatial Lines

SeanAdams
17 - Castor
17 - Castor

Wow - that was somewhat painful.

 

Started out with a trig approach, and in doing so spent 4 hours trying to debug radians vs. degrees and kilometers (turns out that I was using the same math as @Joe_Mako except Joe got it to work)

Then, like @LordNeilLord and @NicoleJohnson I did a strategic retreat and used the same technique used by others ( @gnans19 was first to post this method I think?)

 

This has also spawned a few new product requests:

https://community.alteryx.com/t5/Alteryx-Product-Ideas/Degrees-to-radians-explicit-mention-of-radian...

https://community.alteryx.com/t5/Alteryx-Product-Ideas/Useful-Spatial-formulae/idi-p/85206#M4794

https://community.alteryx.com/t5/Alteryx-Product-Ideas/Key-select-of-type-in-Formula-tool/idi-p/8520...

 

  

Spoiler

Original approach, which I struggled to get to work, used the trig provided on these sites:
https://stackoverflow.com/questions/10140029/convert-latitude-longitude-in-degree-radians
http://www.movable-type.co.uk/scripts/latlong.html
http://www.edwilliams.org/gccalc.htm
http://www.edwilliams.org/avform.htm

However - after several hours of trying to get this to tie out with various versions - I hit restart.

Then did an approach where I I iteratively picked points along the same line (by adding to the latitude & Longitude in ratio) until it hit a 5 mile distance.   But that felt like a brute-force cheat.   I hit restart.

Final method takes a far simpler approach:
- Take the line, and add end-points
- Put a trade area on the end (like a lollipop)
- Change the round bit of the lollipop to points, and find the point that's furthest from the bottom end of the lollipop stick.  Because of the nature of circles, that will be in a straight line with the two points (bottom of lollipop stick; and center of circle)

2017-10-08_18-24-06.png




 

 

PeterV
8 - Asteroid

Hi,

 

Not up to speed on macros yet but the calculations are done and match to 2dps if not 4dps!

 

Kind regards,

Peter

LandonG
8 - Asteroid

Solution attached.

PhilipMannering
16 - Nebula
16 - Nebula

I tried (and struggled) using the spatial tools, then wrote loads of calcs in the formula tool.

Solution attached.

 

 

Spoiler
Two methods shownTwo methods shown
ggruccio
ACE Emeritus
ACE Emeritus

Tried very hard to use a formula for this - then tried buffering and finally landed on trade area method.  

samN
10 - Fireball

one more down, and a step closer to 80

jamielaird
14 - Magnetar

I loved this challenge.

 

In fact, I enjoyed it more than any of the 80 other challenges I've done so far, which is a little weird considering most of the hard work happened in my head while staring at a piece of paper. Once I had an approach figured out, making it work in Alteryx was beautifully quick.

 

As a non-mathematician, you know something special is happening when your desk looks like this and your scribbled notes end up delivering a perfect result. Magical.

 

The breakthrough momentThe breakthrough moment

 

Here's my solution:

 

Spoiler
Screen Shot 2017-12-28 at 22.06.16.png

Update: Comparing against other solutions, it's interesting to see that I could have used distance to select the optimal point from the split trade areas around the start and end point.  I think I probably made it harder for myself by relying on the angle of the line to work out the intercept points (especially given the fact that point 0 in a split circle is at the 90 degree point which makes the math a little counter-intuitive) but even so this feels like a pleasing solution.

Natasha
9 - Comet

I attempted this challenge a while ago but got stuck with trigonometry and left it for later. Here is my solution, definitely overcomplicated one

Spoiler
Screen Shot 2017-12-29 at 12.57.59.png

 

jasperlch
12 - Quasar

Solution attached. Seems the number are slightly different though..

derekbelyea
12 - Quasar
Spoiler
2018-01-13_00215.png