cancel
Showing results for 
Search instead for 
Did you mean: 

Challenge #113: Interpolating Spatial Grid Values

ChristineB
Alteryx Alumni (Retired)

Challenge #113: Interpolating Spatial Grid Values

So many different solutions to last week's Challenge have been posted here!

 

This week's Challenge riffs off a process typically used in spatial analysis with raster inputs: interpolation.  In this Challenge, you are provided with two inputs: a polygon representing the island of Maui (hey, there's still snow in the forecast here in CO...can you blame me for picking a beachy location?) and a table of values representing the elevation measurements for 500 m x 500 m grid cells (much like a Digital Elevation Model).  However, some grid cells contain a value of 0.  We'll use some spatial tools to interpolate, or estimate, the values of the cells containing 0 from a "nearest neighborhood" or surrounding cell values. 

 

First, build a 500 m x 500 m grid around the island of Maui.   Then, interpolate the missing value using the average of the known measurements from the surrounding cells, or "neighborhood".  Use a neighborhood of the 8 nearest surrounding cells in a unique cardinal direction (see example below; a neighborhood of a cell containing a 0 is outlined in blue. In this example, the new interpolated value of the center cell would be 61.5). Should a missing value be located on the edge, use only the nearest cells in a unique cardinal direction, even if 8 values are not used for the calculation.

example.png

 

 

Hint: Grid cell Grd37_68 is column 37, row 68. The Grid tool starts with column 0.

 

Attachment
Download this attachment
Attachment
Download this attachment
danilang
19 - Altair

Re: Challenge #113: Interpolating Spatial Grid Values

A non-spatial solution for me.  I'll have to come back and try the spatial route

 

Spoiler
Solution 113.png

Dan

Attachment
Download this attachment
KOBoyle
11 - Bolide

Re: Challenge #113: Interpolating Spatial Grid Values

Solution attached.

 

Spoiler
challenge_113_spoiler_KO.png
Attachment
Download this attachment
CHarrison
Asteroid

Re: Challenge #113: Interpolating Spatial Grid Values

 
Attachment
Download this attachment
olivia_paquot
Asteroid

Re: Challenge #113: Interpolating Spatial Grid Values

Fun one :-)

I use a buffer around the 0 values & then spatial match (touch or intersect), to avoid problem when the missing value is located on the edge (even if not the case in this exercise)

Attachment
Download this attachment
pasccout
Asteroid

Re: Challenge #113: Interpolating Spatial Grid Values

Here is my solution

Attachment
Download this attachment
jamielaird
Magnetar

Re: Challenge #113: Interpolating Spatial Grid Values

Here's my solution - enjoyed this one.

 

Spoiler
Not sure if I made things harder for myself by not using the spatial tools, but I didn't see the value in this case.

Screenshot 2018-12-27 at 22.08.51.png

Approach based on the below rough notes made when I first examined the problem:

Screenshot 2018-12-28 at 15.28.15.png

Always feels like an easier task once I've got the logic written out, but maybe that's just the way my brain works!
Attachment
Download this attachment
JoshuaGostick
Quasar

Re: Challenge #113: Interpolating Spatial Grid Values

That was a very interesting and unique challenge!

Spoiler
challenge_113.PNG
Attachment
Download this attachment
kelly_gilbert
Pulsar

Re: Challenge #113: Interpolating Spatial Grid Values

This was a fun one, and not too tough. It had a little bit of spatial, a little bit of data prep, and a little bit of data reshaping!

 

Spoiler
I was going to do this using sequential row and column numbers, but figured that I should use a spatial tool since this is a spatial challenge!

challenge_113_workflow.PNG
Attachment
Download this attachment
Highlighted
RichoBsJ
11 - Bolide

Re: Challenge #113: Interpolating Spatial Grid Values

Hi! Here my solution Smiley Happy

Attachment
Download this attachment
ipeng
Asteroid

Re: Challenge #113: Interpolating Spatial Grid Values

My solution

Attachment
Download this attachment