Skip to content

Commit

Permalink
fixed typos
Browse files Browse the repository at this point in the history
  • Loading branch information
mgimond committed Nov 13, 2023
1 parent d870283 commit 7c6f0fd
Show file tree
Hide file tree
Showing 26 changed files with 15 additions and 15 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 10-Map-Algebra_files/figure-html/f10-local02-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 14-Spatial-Interpolation_files/figure-html/f14-idw1-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 14-Spatial-Interpolation_files/figure-html/f14-idw2-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified A08-Point-pattern-analysis_files/figure-html/unnamed-chunk-38-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified A08-Point-pattern-analysis_files/figure-html/unnamed-chunk-41-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified A08-Point-pattern-analysis_files/figure-html/unnamed-chunk-42-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified A10-Interpolation_files/figure-html/unnamed-chunk-10-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified A10-Interpolation_files/figure-html/unnamed-chunk-12-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified A10-Interpolation_files/figure-html/unnamed-chunk-13-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified A10-Interpolation_files/figure-html/unnamed-chunk-14-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified A10-Interpolation_files/figure-html/unnamed-chunk-5-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified A10-Interpolation_files/figure-html/unnamed-chunk-9-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions coordinate-systems-in-r.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ <h1>
<div id="header">
<h1 class="title">Intro to GIS and Spatial Analysis</h1>
<p class="author"><em>Manuel Gimond</em></p>
<p class="date"><em>Last edited on 2023-11-06</em></p>
<p class="date"><em>Last edited on 2023-11-13</em></p>
</div>
<div id="preface" class="section level1 unnumbered hasAnchor">
<h1>Preface<a href="index.html#preface" class="anchor-section" aria-label="Anchor link to header"></a></h1>
Expand Down
2 changes: 1 addition & 1 deletion point-pattern-analysis-in-r.html
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ <h3>Kernel density adjusted for covariate<a href="point-pattern-analysis-in-r.ht
Median :3.377e-03 Median :0.001541
Mean :8.473e-03 Mean :0.007821
3rd Qu.:1.078e-02 3rd Qu.:0.005904
Max. :5.693e-02 Max. :5.103985 </code></pre>
Max. :5.693e-02 Max. :5.105112 </code></pre>
<p>The predicted maximum intensity value is two orders of magnitude greater than that observed.</p>
<p>The overestimation of intenstity values can also be observed at lower values. The following plot limits the data to observed intensities less than 0.04. A red one-to-one line is added for reference. If intensities were similar, they would aggregate around this line.</p>
<div class="sourceCode" id="cb365"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb365-1"><a href="point-pattern-analysis-in-r.html#cb365-1" tabindex="-1"></a><span class="fu">plot</span>(K1_vs_pred<span class="sc">$</span>pred <span class="sc">~</span> K1_vs_pred<span class="sc">$</span>K1, <span class="at">pch=</span><span class="dv">20</span>,</span>
Expand Down
2 changes: 1 addition & 1 deletion reading-and-writing-spatial-data-in-r.html
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ <h3>Geocoding street addresses<a href="reading-and-writing-spatial-data-in-r.htm
<pre><code># A tibble: 3 × 4
name address lat long
&lt;chr&gt; &lt;chr&gt; &lt;dbl&gt; &lt;dbl&gt;
1 Colby College 4000 Mayflower drive, Waterville, ME , 04901 44.56119 -69.65845
1 Colby College 4000 Mayflower drive, Waterville, ME , 04901 44.56615 -69.66232
2 Bates College 275 College st, Lewiston, ME 04240 44.10638 -70.20636
3 Bowdoin College 255 Maine St, Brunswick, ME 04011 43.90870 -69.96142</code></pre>
<p>Another free (but manual) alternative, is to use the US Census Bureau’s web <a href="https://geocoding.geo.census.gov/geocoder/locations/addressbatch?form">geocoding service</a> for creating lat/lon values from a file of US street addresses. This needs to be completed via their web interface and the resulting data table (a CSV file) would then need to be loaded into R as a data frame.</p>
Expand Down
2 changes: 1 addition & 1 deletion search_index.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions spatial-autocorrelation-in-r.html
Original file line number Diff line number Diff line change
Expand Up @@ -734,8 +734,8 @@ <h3>Computing a pseudo p-value from an MC simulation<a href="spatial-autocorrela
<p>To compute the p-value, find the end of the distribution closest to the observed Moran’s I value, then divide that count by the total count. Note that this is a so-called one-sided P-value. See lecture notes for more information.</p>
<div class="sourceCode" id="cb415"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb415-1"><a href="spatial-autocorrelation-in-r.html#cb415-1" tabindex="-1"></a>p <span class="ot">&lt;-</span> <span class="fu">min</span>(N.greater <span class="sc">+</span> <span class="dv">1</span>, n <span class="sc">+</span> <span class="dv">1</span> <span class="sc">-</span> N.greater) <span class="sc">/</span> (n <span class="sc">+</span> <span class="dv">1</span>)</span>
<span id="cb415-2"><a href="spatial-autocorrelation-in-r.html#cb415-2" tabindex="-1"></a>p</span></code></pre></div>
<pre><code>[1] 0.01333333</code></pre>
<p>In our working example, the p-value suggests that there is a small chance (0.013%) of being wrong in stating that the income values are not clustered at the county level.</p>
<pre><code>[1] 0.02166667</code></pre>
<p>In our working example, the p-value suggests that there is a small chance (0.022%) of being wrong in stating that the income values are not clustered at the county level.</p>
</div>
</div>
<div id="app8_5" class="section level2 unnumbered hasAnchor">
Expand Down Expand Up @@ -765,7 +765,7 @@ <h2>Computing the Moran’s I statistic: the easy way<a href="spatial-autocorrel
weights: lw
number of simulations + 1: 600

statistic = 0.28281, observed rank = 584, p-value = 0.02667
statistic = 0.28281, observed rank = 588, p-value = 0.02
alternative hypothesis: greater</code></pre>
<div class="sourceCode" id="cb421"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb421-1"><a href="spatial-autocorrelation-in-r.html#cb421-1" tabindex="-1"></a><span class="co"># Plot the distribution (note that this is a density plot instead of a histogram)</span></span>
<span id="cb421-2"><a href="spatial-autocorrelation-in-r.html#cb421-2" tabindex="-1"></a><span class="fu">plot</span>(MC, <span class="at">main=</span><span class="st">&quot;&quot;</span>, <span class="at">las=</span><span class="dv">1</span>)</span></code></pre></div>
Expand Down Expand Up @@ -797,7 +797,7 @@ <h2>Moran’s I as a function of a distance band<a href="spatial-autocorrelation
weights: lw
number of simulations + 1: 600

statistic = 0.31361, observed rank = 596, p-value = 0.006667
statistic = 0.31361, observed rank = 597, p-value = 0.005
alternative hypothesis: greater</code></pre>

</div>
Expand Down
10 changes: 5 additions & 5 deletions spatial-autocorrelation.html
Original file line number Diff line number Diff line change
Expand Up @@ -767,9 +767,9 @@ <h2><span class="header-section-number">13.4</span> Moran’s <em>I</em> equatio
\]</span></p>
<p>Let’s explore elements of the Moran’s <em>I</em> equation using the following sample dataset.</p>
<div class="figure" style="text-align: center"><span style="display:block;" id="fig:fig15"></span>
<img src="13-Spatial-Autocorrelation_files/figure-html/fig15-1.png" alt="Simulated spatial layer. The figure on the left shows the each cell's ID value. The figure in the middle shows the values for each cell. The figure on the right shows the standardized values using equation (2)." width="672" />
<img src="13-Spatial-Autocorrelation_files/figure-html/fig15-1.png" alt="Simulated spatial layer. The figure on the left shows each cell's ID value. The figure in the middle shows the values for each cell. The figure on the right shows the standardized values using equation (2)." width="672" />
<p class="caption">
Figure 13.15: Simulated spatial layer. The figure on the left shows the each cell’s ID value. The figure in the middle shows the values for each cell. The figure on the right shows the standardized values using equation (2).
Figure 13.15: Simulated spatial layer. The figure on the left shows each cell’s ID value. The figure in the middle shows the values for each cell. The figure on the right shows the standardized values using equation (2).
</p>
</div>
<p>The first step in the computation of a Moran’s <em>I</em> index is the generation of weights. The weights can take on many different values. For example, one could assign a value of <code>1</code> to a neighboring cell as shown in the following matrix.</p>
Expand Down Expand Up @@ -1679,7 +1679,7 @@ <h2><span class="header-section-number">13.4</span> Moran’s <em>I</em> equatio
</tr>
</tbody>
</table>
<p>For example, cell ID <code>1</code> (whose value is 25 and whose standardized value is 0.21) has for neighbors cells <code>2</code>, <code>5</code> and <code>6</code>. Computationally (working with the standardized values), this gives us a summarized neighboring value (aka lagged value), <span class="math inline">\(y_1(lag)\)</span> of:</p>
<p>For example, cell ID <code>1</code> (whose value is 25 and whose standardized value, <span class="math inline">\(z_1\)</span>, is 0.21) has for neighbors cells <code>2</code>, <code>5</code> and <code>6</code>. Computationally (working with the standardized values), this gives us a summarized neighboring value (aka lagged value), <span class="math inline">\(y_1(lag)\)</span> of:</p>
<p><span class="math display">\[
\begin{align*}
y_1 = \sum\limits_j w_{1j} z_j {}={} &amp; (0)(0.21)+(1)(1.17)+(0)(1.5)+ ... + \\
Expand All @@ -1689,9 +1689,9 @@ <h2><span class="header-section-number">13.4</span> Moran’s <em>I</em> equatio
\]</span></p>
<p>Computing the spatially lagged values for the other 15 cells generates the following scatterplot:</p>
<div class="figure" style="text-align: center"><span style="display:block;" id="fig:fig17"></span>
<img src="13-Spatial-Autocorrelation_files/figure-html/fig17-1.png" alt="Moran's *I* scatterplot using a binary weight. The red point is the ($z_1$, $y_i$) pair computed for cell `1`." width="384" />
<img src="13-Spatial-Autocorrelation_files/figure-html/fig17-1.png" alt="Moran's *I* scatterplot using a binary weight. The red point is the ($z_1$, $y_1$) pair computed for cell `1`." width="384" />
<p class="caption">
Figure 13.16: Moran’s <em>I</em> scatterplot using a binary weight. The red point is the (<span class="math inline">\(z_1\)</span>, <span class="math inline">\(y_i\)</span>) pair computed for cell <code>1</code>.
Figure 13.16: Moran’s <em>I</em> scatterplot using a binary weight. The red point is the (<span class="math inline">\(z_1\)</span>, <span class="math inline">\(y_1\)</span>) pair computed for cell <code>1</code>.
</p>
</div>
<p>You’ll note that the range of neighboring values along the <span class="math inline">\(y\)</span>-axis is much greater than that of the original values on the <span class="math inline">\(x\)</span>-axis. This is not necessarily an issue given that the Moran’s <span class="math inline">\(I\)</span> correlation coefficient standardizes the values by recentering them on the overall mean <span class="math inline">\((X - \bar{X})/s\)</span>. This is simply to re-emphasize that we are interested in how a neighboring value varies relative to a feature’s value, regardless of the scale of values in either batches.</p>
Expand Down

0 comments on commit 7c6f0fd

Please sign in to comment.