Skip to content

Commit

Permalink
Deploy commit: Typo fix (missing comma) missed by proofreading team 1…
Browse files Browse the repository at this point in the history
  • Loading branch information
Robinlovelace committed Sep 26, 2024
1 parent 8a4c30f commit 37b46a7
Show file tree
Hide file tree
Showing 33 changed files with 98 additions and 86 deletions.
2 changes: 1 addition & 1 deletion 10-gis.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ rather than relying on pointing and clicking on different parts of a screen, you
A common and effective workflow when using interactive development environments such as RStudio or VS Code is to type code into source files in a source editor and control interactive execution of the code with a shortcut such as `Ctrl+Enter`.

Command line interfaces (CLIs) are not unique to R: most early computing environments relied on a command line 'shell' and it was only after the invention and widespread adoption of the computer mouse in the 1990s that graphical user interfaces (GUIs)\index{graphical user interface} became common.
GRASS GIS the longest-standing continuously developed open source GIS\index{GIS} software, for example, relied on its CLI before it gained a GUI [@landa_new_2008].
GRASS GIS, the longest-standing continuously developed open source GIS\index{GIS} software, for example, relied on its CLI before it gained a GUI [@landa_new_2008].
Most popular GIS software projects are GUI-driven.
You *can* interact with QGIS\index{QGIS}, SAGA\index{SAGA}, GRASS GIS\index{GRASS GIS} and gvSIG from system terminals and embedded CLIs, but their design encourages most people to interact with them by 'pointing and clicking'.
An unintended consequence of this is that most GIS users miss out on the advantages of CLI-driven and scriptable approaches.
Expand Down
12 changes: 11 additions & 1 deletion 13-transport.md
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ routes_short_scenario = routes_short |>
mutate(bicycle = bicycle + car_driver * uptake,
car_driver = car_driver * (1 - uptake))
sum(routes_short_scenario$bicycle) - sum(routes_short$bicycle)
#> [1] 598
#> [1] 253
```

Having created a scenario in which approximately 4000 trips have switched from driving to cycling, we can now model where this updated modeled cycling activity will take place.
Expand All @@ -584,6 +584,11 @@ route_network_scenario = overline(routes_short_scenario, attrib = "bicycle")

The outputs of the two preceding code chunks are summarized in Figure \@ref(fig:rnetvis) below.


```
#> [plot mode] fit legend/component: Some legend items or map compoments do not fit well, and are therefore rescaled. Set the tmap option 'component.autoscale' to FALSE to disable rescaling.
```

<div class="figure" style="text-align: center">
<img src="figures/rnetvis-1.png" alt="Illustration of the percentage of car trips switching to cycling as a function of distance (left) and route network level results of this function (right)." width="49%" /><img src="figures/rnetvis-2.png" alt="Illustration of the percentage of car trips switching to cycling as a function of distance (left) and route network level results of this function (right)." width="49%" />
<p class="caption">(\#fig:rnetvis)Illustration of the percentage of car trips switching to cycling as a function of distance (left) and route network level results of this function (right).</p>
Expand Down Expand Up @@ -643,6 +648,11 @@ ways_centrality = ways_sfn |>
mutate(betweenness = tidygraph::centrality_edge_betweenness(lengths))
```


```
#> [plot mode] fit legend/component: Some legend items or map compoments do not fit well, and are therefore rescaled. Set the tmap option 'component.autoscale' to FALSE to disable rescaling.
```

<div class="figure" style="text-align: center">
<img src="figures/wayssln-1.png" alt="Illustration of route network datasets. The grey lines represent a simplified road network, with segment thickness proportional to betweenness. The green lines represent potential cycling flows (one way) calculated with the code above." width="100%" />
<p class="caption">(\#fig:wayssln)Illustration of route network datasets. The grey lines represent a simplified road network, with segment thickness proportional to betweenness. The green lines represent potential cycling flows (one way) calculated with the code above.</p>
Expand Down
2 changes: 1 addition & 1 deletion 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ <h2>Second Edition</h2>
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">

<div class="col-12 col-md-6 mt-3">
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2024-09-25.</p>
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2024-09-26.</p>
</div>

<div class="col-12 col-md-6 mt-3">
Expand Down
2 changes: 1 addition & 1 deletion adv-map.html
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,7 @@ <h2>Second Edition</h2>
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">

<div class="col-12 col-md-6 mt-3">
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2024-09-25.</p>
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2024-09-26.</p>
</div>

<div class="col-12 col-md-6 mt-3">
Expand Down
2 changes: 1 addition & 1 deletion algorithms.html
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ <h2>Second Edition</h2>
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">

<div class="col-12 col-md-6 mt-3">
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2024-09-25.</p>
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2024-09-26.</p>
</div>

<div class="col-12 col-md-6 mt-3">
Expand Down
2 changes: 1 addition & 1 deletion attr.html
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ <h2>Second Edition</h2>
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">

<div class="col-12 col-md-6 mt-3">
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2024-09-25.</p>
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2024-09-26.</p>
</div>

<div class="col-12 col-md-6 mt-3">
Expand Down
10 changes: 5 additions & 5 deletions conclusion.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ <h2>
</h2>
<p>A feature of R, and open source software in general, is that there are often multiple ways to achieve the same result.
The code chunk below illustrates this by using three functions, covered in Chapters <a href="attr.html#attr">3</a> and <a href="geometry-operations.html#geometry-operations">5</a>, to combine the 16 regions of New Zealand into a single geometry:</p>
<div class="sourceCode" id="cb511"><pre class="downlit sourceCode r">
<div class="sourceCode" id="cb513"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://jakubnowosad.com/spData/">spData</a></span><span class="op">)</span></span>
<span><span class="va">nz_u1</span> <span class="op">=</span> <span class="fu">sf</span><span class="fu">::</span><span class="fu"><a href="https://r-spatial.github.io/sf/reference/geos_combine.html">st_union</a></span><span class="op">(</span><span class="va">nz</span><span class="op">)</span></span>
<span><span class="va">nz_u2</span> <span class="op">=</span> <span class="fu"><a href="https://rspatial.github.io/terra/reference/aggregate.html">aggregate</a></span><span class="op">(</span><span class="va">nz</span><span class="op">[</span><span class="st">"Population"</span><span class="op">]</span>, <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/rep.html">rep</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fu"><a href="https://rspatial.github.io/terra/reference/dimensions.html">nrow</a></span><span class="op">(</span><span class="va">nz</span><span class="op">)</span><span class="op">)</span><span class="op">)</span>, <span class="va">sum</span><span class="op">)</span></span>
Expand All @@ -154,7 +154,7 @@ <h2>
The same applies for all packages showcased in this book, although it can be helpful (when not distracting) to be aware of alternatives and being able to justify your choice of software.</p>
<p>A common choice, for which there is no simple answer, is between <strong>tidyverse</strong> and base R for geocomputation.
The following code chunk, for example, shows <strong>tidyverse</strong> and base R ways to extract the <code>Name</code> column from the <code>nz</code> object, as described in Chapter <a href="attr.html#attr">3</a>:</p>
<div class="sourceCode" id="cb512"><pre class="downlit sourceCode r">
<div class="sourceCode" id="cb514"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://dplyr.tidyverse.org">dplyr</a></span><span class="op">)</span> <span class="co"># attach a tidyverse package</span></span>
<span><span class="va">nz_name1</span> <span class="op">=</span> <span class="va">nz</span><span class="op">[</span><span class="st">"Name"</span><span class="op">]</span> <span class="co"># base R approach</span></span>
<span><span class="va">nz_name2</span> <span class="op">=</span> <span class="va">nz</span> <span class="op">|&gt;</span> <span class="co"># tidyverse approach</span></span>
Expand Down Expand Up @@ -280,13 +280,13 @@ <h3>
You could simply ask how to do this in one of the places outlined in the previous section.
However, it is likely that you will get a better response if you provide a reproducible example of what you have tried so far.
The following code creates a map of the world with blue sea and green land, but the land is not filled in:</p>
<div class="sourceCode" id="cb513"><pre class="downlit sourceCode r">
<div class="sourceCode" id="cb515"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://r-spatial.github.io/sf/">sf</a></span><span class="op">)</span></span>
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://jakubnowosad.com/spData/">spData</a></span><span class="op">)</span></span>
<span><span class="fu"><a href="https://rspatial.github.io/terra/reference/plot.html">plot</a></span><span class="op">(</span><span class="fu"><a href="https://r-spatial.github.io/sf/reference/st_geometry.html">st_geometry</a></span><span class="op">(</span><span class="va">world</span><span class="op">)</span>, col <span class="op">=</span> <span class="st">"green"</span><span class="op">)</span></span></code></pre></div>
<p>If you post this code in a forum, it is likely that you will get a more specific and useful response.
For example, someone might respond with the following code, which demonstrably solves the problem, as illustrated in Figure <a href="conclusion.html#fig:16-synthesis-reprex">16.1</a>:</p>
<div class="sourceCode" id="cb514"><pre class="downlit sourceCode r">
<div class="sourceCode" id="cb516"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://r-spatial.github.io/sf/">sf</a></span><span class="op">)</span></span>
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://jakubnowosad.com/spData/">spData</a></span><span class="op">)</span></span>
<span><span class="co"># use the bg argument to fill in the land</span></span>
Expand Down Expand Up @@ -444,7 +444,7 @@ <h2>Second Edition</h2>
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">

<div class="col-12 col-md-6 mt-3">
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2024-09-25.</p>
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2024-09-26.</p>
</div>

<div class="col-12 col-md-6 mt-3">
Expand Down
Loading

0 comments on commit 37b46a7

Please sign in to comment.