Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>One simple and somewhat inaccurate way to do this would be to decrease the granularity of your data. It might not even be inaccurate, depending on how accurate your x, y measurements are.</p> <p>let's say we have the following data:</p> <pre><code>x y signal_strenth 10.2 5.1 10 10.1 5.3 12 10.3 5.5 8 </code></pre> <p>If we floor the x and y values, we get:</p> <pre><code>x y signal_strenth 10 5 10 10 5 12 10 5 9 </code></pre> <p>Then we can average those values by the floored x and y to show that we have average signal strength in the rectangle (10, 5) to (11, 6).</p> <p>Here's the SQL:</p> <pre><code>select floor(x) as rectangle_xmin, floor(y) as rectangle_ymin, floor(x) + 1 as rectangle_xmax, floor(y) + 1 as rectangle_ymax, avg(signal_strength) as signal_strength from table group by floor(x), floor(y); </code></pre> <p>Now, admittedly, you'd ideally want to group data points by distance from point to point, and this groups them by a maximum distance that varies from 1 and to square_root(2) =~1.44, flooring them into rectangular blocks. So it's less than <em>ideal</em>. But it may work well enough for you, especially if the flooring/grouping is less than the error in your measurement of position.</p> <p>If <code>floor()</code> is not granular enough, you can use <code>floor( x *</code> someweight<code>) /</code> someweight to adjust it to the granularity you want. And of course you can use <code>ceil()</code> or <code>round()</code> to do the same thing. </p> <p>The whole point is to <em>collapse</em> a bunch of nearby measurements to one "measurement", and then take the average of the collapsed values.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload