Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

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 #70: Trade Area Drivetime Radii

MattD
Alteryx Alumni (Retired)

The solution to last week's challenge is HERE!

 

Challenge 70.jpg

 

Today we’re challenged to find the total area (square miles) that we can move our company headquarters to such that it is an equidistant commute from 3 satellite offices. In order to do so, find the area that is shared by a 30 minute drive time radius starting from each of the satellite offices!

 

Be warned! You may arrive on different areas depending on the spatial data release that is used, in addition to the drivetime methodology selected. For the sake of comparison, use the above map as an estimation of the area if you are not using the Q2: 2016 TomTom US Peak Most Recent Vintage dataset. If you think you need a hint, expand the spoiler below!

 

Spoiler
This week's challenge is inspired by the methodologies covered in our Trade Area Tool Mastery article from the Knowledgebase. If you're having trouble, try mastering the Trade Area Tool first!

 

Former Alteryx, Inc. Support Engineer, Community Data Architect, Data Scientist then Data Engineer
MarqueeCrew
20 - Arcturus
20 - Arcturus

I used Tom Tom Q4 Peak.  Hopefully, I didn't miss anything here.

 

Spoiler
Capture.PNG

If I did, someone will point it out to me (I'm sure).

 

Cheers,
Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
NicoleJohnson
ACE Emeritus
ACE Emeritus

My (pseudo) solution. I don't have access to drivetime data, so I wasn't able to answer the question exactly as asked... but I can see comparing to @MarqueeCrew 's solution that I have the same process, so barring changing from "miles" to "minutes" if I'd had the drivetime dataset, I believe it's the same. So count this as my "I drew this with a stick in the sand because I didn't have the right tools" solution? :)

 

Spoiler
For my pseudo-solution, I made some assumptions about average speed limit based on a couple random GoogleMaps directions queries to places in the area of the three original points. Determined an average speed limit of about 32mph, which gave be about a 16 mile radius. The area in my answer is larger than that shown in the results, but since it's calculating the radii "as the crow flies... at precisely 32mph...", that's more or less explainable.
WeeklyChallenge70.JPG
alex
11 - Bolide

I don't have the spatial package either so I winged it to come up with 2 different areas to consider for the HQ.  I used a both spatial tools and spatial formulas to come up with the answers.

Spoiler
1) I created a center point by averaging all the longitudes and latitudes for the 3 offices.
2) Using the answer of an area of 30.967 square miles, I backed into a radius (3.14 - just happens to be approx. PI) to create a trade area around the center point.
3) Using midpoints between each point and also midpoints between each point and the center, I created a polygon, but the area was approx 50 square miles.
4) I then created new midpoints between the previous midpoints and the center to make the area smaller and closer to the center.  This polygon had an area of 12.64 square miles.

centermap.JPGcentermap3.JPGcentermap2.JPG
Natasha
9 - Comet

It is a bit frustrating that the correct solution is available only to the owners of a spatial package. But challenge is a challenge, and I made some driving time assumptions based on the speed limit. My assumptions are a bit bolder than those of NicoleJohnson, but the solution itself is similar. 

 

 

SeanAdams
17 - Castor
17 - Castor
Hey @MattD - are we as a community misunderstanding something (a few people have mentioned the dependence on spatial package), or is this indeed a solution that can only be fully completed if you have the additional license for this data?

For example - I'm wondering if you had something in mind related to punching out to a different API that can do this. IF this is the case - can you give a hint?

:) have a good day Matt
Sean
SeanAdams
17 - Castor
17 - Castor

Used a similar "stick in the sand" approach as @NicoleJohnson and @Natasha.   As Nicole says, it's the same solution as Mark @MarqueeCrew, but using a mile-radius rather than a drive-time radius.    Still holding out that @MattD has some sneaky idea up his sleeve for those of us without spatial data packages...

 

 

Image below is the final resulting intersection and the original locations of the satellite offices.

2017-05-16_22-45-45.png

 

 

Spoiler
2017-05-16_22-45-16.png
estherb47
15 - Aurora
15 - Aurora

I have an outdated spatial release (getting the update soon), so my numbers are slightly off. This is with 2015 Q3 data.

Spoiler
Spoiler

Map of the overlapping trade area:image.png

My workflow:
image.png
MattD
Alteryx Alumni (Retired)

Hey Everyone!

 

For those of you who do not have the spatial data package, I went ahead and created a macro that uses Google Maps to calculate distance and drivetime between two points or addresses! While you'll still end up with a different total area as compared to the Q2: 2016 TomTom US Peak Most Recent Vintage dataset, this will make it so that you can answer these types of questions in the future without full access to the spatial data package!

Former Alteryx, Inc. Support Engineer, Community Data Architect, Data Scientist then Data Engineer
NicoleJohnson
ACE Emeritus
ACE Emeritus

Thank you @MattD!!! You're the best! :)