Skip to content

Commit

Permalink
Deploy commit: improves ch16 (#1127) 5e2dd84
Browse files Browse the repository at this point in the history
  • Loading branch information
Robinlovelace committed Sep 25, 2024
1 parent feacb47 commit 64ead99
Show file tree
Hide file tree
Showing 12 changed files with 65 additions and 64 deletions.
2 changes: 1 addition & 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] 558
#> [1] 583
```

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 Down
57 changes: 29 additions & 28 deletions 16-synthesis.md

Large diffs are not rendered by default.

66 changes: 33 additions & 33 deletions conclusion.html

Large diffs are not rendered by default.

Binary file modified figures/circle-intersection-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 figures/cycleways-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 figures/points-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 figures/rnetvis-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 figures/rnetvis-2.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 figures/routes-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 figures/wayssln-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion search.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion transport.html
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ <h2>
<span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span>bicycle <span class="op">=</span> <span class="va">bicycle</span> <span class="op">+</span> <span class="va">car_driver</span> <span class="op">*</span> <span class="va">uptake</span>,</span>
<span> car_driver <span class="op">=</span> <span class="va">car_driver</span> <span class="op">*</span> <span class="op">(</span><span class="fl">1</span> <span class="op">-</span> <span class="va">uptake</span><span class="op">)</span><span class="op">)</span></span>
<span><span class="fu"><a href="https://rdrr.io/r/base/sum.html">sum</a></span><span class="op">(</span><span class="va">routes_short_scenario</span><span class="op">$</span><span class="va">bicycle</span><span class="op">)</span> <span class="op">-</span> <span class="fu"><a href="https://rdrr.io/r/base/sum.html">sum</a></span><span class="op">(</span><span class="va">routes_short</span><span class="op">$</span><span class="va">bicycle</span><span class="op">)</span></span>
<span><span class="co">#&gt; [1] 558</span></span></code></pre></div>
<span><span class="co">#&gt; [1] 583</span></span></code></pre></div>
<p>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.
For this, we will use the function <code><a href="https://docs.ropensci.org/stplanr/reference/overline.html">overline()</a></code> from the <strong>stplanr</strong> package.
The function breaks linestrings at junctions (were two or more linestring geometries meet), and calculates aggregate statistics for each unique route segment <span class="citation">(<a href="references.html#ref-morgan_travel_2020">Morgan and Lovelace 2020</a>)</span>, taking an object containing routes and the names of the attributes to summarize as the first and second argument:</p>
Expand Down

0 comments on commit 64ead99

Please sign in to comment.