Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

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 #67: Calculate Spatial Angles

JoeM
Alteryx Alumni (Retired)

The solution to last week's challenge can be found HERE.

 

This week, we get back to spatial! A wireless carrier wants to geolocate or triangulate the location of a device/user based on the location of nearby cell towers and the device/user by determining the azimuth. As a result, they would like to calculate the angle (in degrees) between two points where a line is drawn from the lower point directly horizontally towards the other point. 

AZIMUTH.gif

Bonus: Try solving one way with the spatial tools, and another using no spatial tools!

 

 

NicoleJohnson
ACE Emeritus
ACE Emeritus

My solution, two ways - one with spatial tools, one without! :)

 

PS. Holy trigonometry, I had to dig deep for that one. My high school self is very disappointed with me right now for apparently forgetting everything I once knew about calculating angles...

 

 

Spoiler

WeeklyChallenge67.JPG

 

alex
11 - Bolide

I used a couple more tools than @NicoleJohnson to calculate all the distances and angles, but came away with the solution in both formats.  Another Masonic image transposed onto the DC landscape :>

 

Spoiler
67a.JPG67b.JPG67c.JPG
MarqueeCrew
20 - Arcturus
20 - Arcturus

I got to the same answer as @NicoleJohnson, but stopped after getting the right result.  I get no dessert. 

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
MinaGO
7 - Meteor

Oh gosh my way is super hackish and I didnt know how to do the bonus. I've had a look and there are definitely a lot of spatial features I am not familiar with, especially the functions, nice to learn from other's answers.

Spoiler
Screenshot (356).png
SeanAdams
17 - Castor
17 - Castor

So - full credit goes to this site which explained the full math of the great circle distance; provided pseudo code in Java / excel formulas; etc.   http://www.movable-type.co.uk/scripts/latlong.html

I fully admit I don't understand the derivation of these formulae, but at least a little smarter now on how to use some of the trig & distance functions in Alteryx

 

This solution contains both spatial & basic trig version, and the non-spatial calculates both distance and angle fully using trig.

 

To @NicoleJohnson 's point - who would have ever thought that a subject like "Math" would come in useful one day...  

Possibly one-day, I may find a good use for some of the other subjects we did in school like accounting; computer science; Inglish Wrting; etc. :-)

 

Spoiler

Capture.PNG

 

 

Natasha
9 - Comet

Hopefully, my spatial solution will count as spatial since I used only one spatial tool. 

 

I also have to admit a trigonometry defeat as I am sure 16 formulas were unnecessary and the answer I got was anyway smaller by ~1,5 degrees. That being sad, my spacial answer is also a bit off but I guess it can be a rounding error.

 

 

Spoiler
Screen Shot 2017-04-28 at 23.39.31.png

 

 

 

 

 

 

 

JoeM
Alteryx Alumni (Retired)

The solution for Challenge #67 is posted! I'm sorry if is exacerbated any negative feelings around having to recall some highschool trig for that bonus. :)

Natasha
9 - Comet

Thanks, JoeM

 

I see many people use Spatial info before cross tab and distance calculation. Is there any reason for that, as I had the same results without this step?

estherb47
15 - Aurora
15 - Aurora

Haven't solved it without the spatial tools yet. Here's my solution with the spatial tools. Nothing very creative.