<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Matching Spatially Inhomogeneous Data in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Matching-Spatially-Inhomogeneous-Data/m-p/510521#M73793</link>
    <description>&lt;P&gt;Maybe this would be helpful &lt;LI-MESSAGE title="How to do Bilinear Interpolation using JMP?" uid="106727" url="https://community.jmp.com/t5/Discussions/How-to-do-Bilinear-Interpolation-using-JMP/m-p/106727#U106727" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There also seems to be &lt;A href="https://www.jmp.com/support/help/en/16.2/#page/jmp/interpolate.shtml#ww321812" target="_blank" rel="noopener"&gt; Scripting Guide &amp;gt; JSL Building Blocks &amp;gt; Conditional Functions &amp;gt; Interpolate &amp;gt; Bilinear Interpolation (jmp.com)&lt;/A&gt; but I haven't used that.&lt;/P&gt;</description>
    <pubDate>Wed, 15 Jun 2022 20:44:40 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2022-06-15T20:44:40Z</dc:date>
    <item>
      <title>Matching Spatially Inhomogeneous Data</title>
      <link>https://community.jmp.com/t5/Discussions/Matching-Spatially-Inhomogeneous-Data/m-p/510494#M73785</link>
      <description>&lt;P&gt;I have two data tables of values that are spatially mapped, but the coordinates of one table are not the same coordinates as the second. I would like to "Join" these tables but have the data match by coordinate so I can compare the spatially variant values between the two tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know if there's an easy way to do this instead of just brute force calculating for every value? There looks to be some interesting matrix functions but I am unfamiliar with the mathematical concepts behind them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp; have a mockup of the process shown below that hopefully conveys what I want to have happen.&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;V&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;4&lt;/T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/LI-SPOILER&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:01:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Matching-Spatially-Inhomogeneous-Data/m-p/510494#M73785</guid>
      <dc:creator>Resonator_Drift</dc:creator>
      <dc:date>2023-06-09T17:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Matching Spatially Inhomogeneous Data</title>
      <link>https://community.jmp.com/t5/Discussions/Matching-Spatially-Inhomogeneous-Data/m-p/510505#M73790</link>
      <description>&lt;P&gt;&lt;STRIKE&gt;I think VPTree() or Distance() could work here (maybe KDTable()), but what do you do in ties?&lt;/STRIKE&gt;&lt;/P&gt;
&lt;P&gt;Not looking for closest points but rather points in same line and interpolation after that if I understood correct.y.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 20:25:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Matching-Spatially-Inhomogeneous-Data/m-p/510505#M73790</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-06-15T20:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Matching Spatially Inhomogeneous Data</title>
      <link>https://community.jmp.com/t5/Discussions/Matching-Spatially-Inhomogeneous-Data/m-p/510506#M73791</link>
      <description>&lt;P&gt;I do not understand how you come up with the value for IV.&amp;nbsp; Could you please explain the rules you are using?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 19:39:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Matching-Spatially-Inhomogeneous-Data/m-p/510506#M73791</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-06-15T19:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: Matching Spatially Inhomogeneous Data</title>
      <link>https://community.jmp.com/t5/Discussions/Matching-Spatially-Inhomogeneous-Data/m-p/510507#M73792</link>
      <description>&lt;P&gt;IV was the interpolated value of XYV (Table 1) from the table, using the coordinates from the XY (Table 2) table&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 20:02:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Matching-Spatially-Inhomogeneous-Data/m-p/510507#M73792</guid>
      <dc:creator>Resonator_Drift</dc:creator>
      <dc:date>2022-06-15T20:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: Matching Spatially Inhomogeneous Data</title>
      <link>https://community.jmp.com/t5/Discussions/Matching-Spatially-Inhomogeneous-Data/m-p/510521#M73793</link>
      <description>&lt;P&gt;Maybe this would be helpful &lt;LI-MESSAGE title="How to do Bilinear Interpolation using JMP?" uid="106727" url="https://community.jmp.com/t5/Discussions/How-to-do-Bilinear-Interpolation-using-JMP/m-p/106727#U106727" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There also seems to be &lt;A href="https://www.jmp.com/support/help/en/16.2/#page/jmp/interpolate.shtml#ww321812" target="_blank" rel="noopener"&gt; Scripting Guide &amp;gt; JSL Building Blocks &amp;gt; Conditional Functions &amp;gt; Interpolate &amp;gt; Bilinear Interpolation (jmp.com)&lt;/A&gt; but I haven't used that.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 20:44:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Matching-Spatially-Inhomogeneous-Data/m-p/510521#M73793</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-06-15T20:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Matching Spatially Inhomogeneous Data</title>
      <link>https://community.jmp.com/t5/Discussions/Matching-Spatially-Inhomogeneous-Data/m-p/510591#M73818</link>
      <description>&lt;P&gt;If the polygon layout data table is regular and complete&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1655399523283.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/43326iFFCDCE8A4520ED32/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1655399523283.png" alt="txnelson_0-1655399523283.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

// Create the example data tables
New Table( "Data",
	Add Rows( 4 ),
	New Column( "x", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [0.5, 1.5, 0.5, 1.5] ) ),
	New Column( "y", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [0.5, 0.5, 1.5, 1.5] ) )
);

New Table( "Layout",
	Add Rows( 9 ),
	New Column( "X", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [0, 1, 2, 0, 1, 2, 0, 1, 2] ) ),
	New Column( "Y", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [0, 0, 0, 1, 1, 1, 2, 2, 2] ) ),
	New Column( "V", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [0, 1, 2, 1, 2, 3, 2, 3, 4] ) ),
	Set Row States( [8, 8, 8, 8, 8, 8, 8, 8, 8] ),
	Set Label Columns( :V )
);

// Calculate the IV data
dtLookup = Data Table( "Layout" );
dtData = Data Table( "Data" );

dtData &amp;lt;&amp;lt; New Column( "IV" );
For( i = 1, i &amp;lt;= N Rows( dtData ), i++, 

	xVal = dtData:X[i];
	yVal = dtData:Y[i];

	yMin = Col Max( If( dtLookup:Y &amp;lt; yVal, dtLookup:Y, . ) );
	yMax = Col Min( If( dtLookup:Y &amp;gt; yVal, dtLookup:Y, . ) );
	xMin = Col Max( If( dtLookup:X &amp;lt; xVal, dtLookup:X, . ) );
	xMax = Col Min( If( dtLookup:X &amp;gt; xVal, dtLookup:X, . ) );

	botLeft = dtLookup:V[(dtLookup &amp;lt;&amp;lt; get rows where( :X == xMin &amp;amp; :Y == yMin ))[1]];
	botRight = dtLookup:V[(dtLookup &amp;lt;&amp;lt; get rows where( :X == xMax &amp;amp; :Y == yMin ))[1]];
	topLeft = dtLookup:V[(dtLookup &amp;lt;&amp;lt; get rows where( :X == xMin &amp;amp; :Y == yMax ))[1]];
	topRight = dtLookup:V[(dtLookup &amp;lt;&amp;lt; get rows where( :X == xMax &amp;amp; :Y == yMax ))[1]];
	dtData:IV[i] = Mean( botLeft, botRight, topLeft, topRight );
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Jun 2022 17:13:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Matching-Spatially-Inhomogeneous-Data/m-p/510591#M73818</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-06-16T17:13:05Z</dc:date>
    </item>
  </channel>
</rss>

