Skip to content

Commit

Permalink
update chp1
Browse files Browse the repository at this point in the history
  • Loading branch information
fcorowe committed Feb 23, 2024
1 parent 29de42b commit b228b53
Show file tree
Hide file tree
Showing 15 changed files with 101 additions and 81 deletions.
5 changes: 4 additions & 1 deletion 01-overview.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,14 @@ invisible(lapply(packages, library, character.only = TRUE))

::: column-margin
::: callout-note

To install the library `basemapR`, you need to install from source by running:

`library(devtools)`
`install_github('Chrisjb/basemapR')`
::: ::: column-margin

:::
:::

## Assessment

Expand Down
107 changes: 62 additions & 45 deletions docs/01-overview.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/03-data-wrangling.html

Large diffs are not rendered by default.

Binary file modified docs/05-flows_files/figure-html/unnamed-chunk-17-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 docs/05-flows_files/figure-html/unnamed-chunk-18-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 docs/05-flows_files/figure-html/unnamed-chunk-22-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 24 additions & 24 deletions docs/07-multilevel-01.html
Original file line number Diff line number Diff line change
Expand Up @@ -915,27 +915,27 @@
<span> <span class="fu"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op">(</span><span class="fl">10</span><span class="op">)</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code> groupFctr groupID term mean median
1 lsoa_cd:msoa_cd E01006512:E02001377 (Intercept) -0.015081714 -0.016104561
2 lsoa_cd:msoa_cd E01006513:E02006932 (Intercept) -0.018509169 -0.018837238
3 lsoa_cd:msoa_cd E01006514:E02001383 (Intercept) -0.021414352 -0.021638964
4 lsoa_cd:msoa_cd E01006515:E02001383 (Intercept) -0.019405726 -0.020418908
5 lsoa_cd:msoa_cd E01006518:E02001390 (Intercept) -0.016291590 -0.017026864
6 lsoa_cd:msoa_cd E01006519:E02001402 (Intercept) -0.015274075 -0.015047501
7 lsoa_cd:msoa_cd E01006520:E02001389 (Intercept) -0.021349416 -0.022839020
8 lsoa_cd:msoa_cd E01006521:E02001398 (Intercept) 0.006256878 0.008382039
9 lsoa_cd:msoa_cd E01006522:E02001394 (Intercept) 0.018705749 0.020251657
10 lsoa_cd:msoa_cd E01006523:E02001398 (Intercept) 0.003301707 0.002395617
sd
1 0.01898623
2 0.01996967
3 0.01986592
4 0.01974002
5 0.02149855
6 0.01011427
7 0.01860648
8 0.02014752
9 0.01810913
10 0.01918916</code></pre>
1 lsoa_cd:msoa_cd E01006512:E02001377 (Intercept) -0.017672467 -0.015806783
2 lsoa_cd:msoa_cd E01006513:E02006932 (Intercept) -0.016100308 -0.017000565
3 lsoa_cd:msoa_cd E01006514:E02001383 (Intercept) -0.025442989 -0.026267409
4 lsoa_cd:msoa_cd E01006515:E02001383 (Intercept) -0.018891281 -0.019143435
5 lsoa_cd:msoa_cd E01006518:E02001390 (Intercept) -0.019148563 -0.018554435
6 lsoa_cd:msoa_cd E01006519:E02001402 (Intercept) -0.015492272 -0.015722844
7 lsoa_cd:msoa_cd E01006520:E02001389 (Intercept) -0.025259003 -0.025007573
8 lsoa_cd:msoa_cd E01006521:E02001398 (Intercept) 0.007955532 0.007993531
9 lsoa_cd:msoa_cd E01006522:E02001394 (Intercept) 0.017985515 0.019536137
10 lsoa_cd:msoa_cd E01006523:E02001398 (Intercept) 0.005355117 0.005633975
sd
1 0.018391211
2 0.019652099
3 0.019058745
4 0.020226381
5 0.019389638
6 0.009645985
7 0.019125663
8 0.020530033
9 0.018747930
10 0.018392227</code></pre>
</div>
</div>
<p>The results contain the estimated mean, median and standard deviation for the intercept within each group (e.g.&nbsp;LSOA). The mean estimates are similar to those obtained from <code>ranef</code> with some small differences due to rounding.</p>
Expand Down Expand Up @@ -1009,9 +1009,9 @@
$ groupFctr: chr "msoa_cd" "msoa_cd" "msoa_cd" "msoa_cd" ...
$ groupID : chr "E02001347" "E02001348" "E02001349" "E02001350" ...
$ term : chr "(Intercept)" "(Intercept)" "(Intercept)" "(Intercept)" ...
$ mean : num -0.01015 -0.02574 -0.03053 0.00527 0.02168 ...
$ median : num -0.01187 -0.02646 -0.03328 0.00648 0.02084 ...
$ sd : num 0.0317 0.0285 0.032 0.0299 0.0153 ...</code></pre>
$ mean : num -0.0145 -0.01995 -0.03009 0.00967 0.02172 ...
$ median : num -0.01712 -0.01983 -0.03441 0.00521 0.02216 ...
$ sd : num 0.031 0.0347 0.0324 0.0304 0.0158 ...</code></pre>
</div>
<div class="sourceCode" id="cb47"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co"># merge data</span></span>
<span><span class="va">msoa_shp</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/merge.html">merge</a></span><span class="op">(</span>x <span class="op">=</span> <span class="va">msoa_shp</span>, y <span class="op">=</span> <span class="va">re_msoa</span>, by.x <span class="op">=</span> <span class="st">"MSOA_CD"</span>, by.y <span class="op">=</span> <span class="st">"groupID"</span><span class="op">)</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
Expand Down
Binary file modified docs/07-multilevel-01_files/figure-html/unnamed-chunk-21-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 docs/07-multilevel-01_files/figure-html/unnamed-chunk-24-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/08-multilevel-02.html
Original file line number Diff line number Diff line change
Expand Up @@ -513,9 +513,9 @@
$ groupFctr: chr "msoa_cd" "msoa_cd" "msoa_cd" "msoa_cd" ...
$ groupID : chr "E02001347" "E02001348" "E02001349" "E02001350" ...
$ term : chr "lt_ill" "lt_ill" "lt_ill" "lt_ill" ...
$ mean : num 0.0289 -0.1117 0.0553 -0.1424 -0.2842 ...
$ median : num 0.0266 -0.1073 0.0538 -0.1364 -0.28 ...
$ sd : num 0.0461 0.0645 0.0762 0.0383 0.0391 ...</code></pre>
$ mean : num 0.0229 -0.111 0.0609 -0.1436 -0.2818 ...
$ median : num 0.0249 -0.1176 0.0553 -0.1416 -0.285 ...
$ sd : num 0.0443 0.0698 0.0776 0.0413 0.038 ...</code></pre>
</div>
<div class="sourceCode" id="cb20"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co"># merge data</span></span>
<span><span class="va">msoa_shp</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/pkg/sp/man/merge.html">merge</a></span><span class="op">(</span>x <span class="op">=</span> <span class="va">msoa_shp</span>, y <span class="op">=</span> <span class="va">re_msoa_m6</span>, by.x <span class="op">=</span> <span class="st">"MSOA_CD"</span>, by.y <span class="op">=</span> <span class="st">"groupID"</span><span class="op">)</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
Expand Down
Binary file modified docs/08-multilevel-02_files/figure-html/unnamed-chunk-11-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 docs/08-multilevel-02_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 docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

<meta name="author" content="Francisco Rowe, Dani Arribas-Bel">
<meta name="dcterms.date" content="2024-02-22">
<meta name="dcterms.date" content="2024-02-23">

<title>Spatial Modelling for Data Scientists</title>
<style>
Expand Down Expand Up @@ -262,7 +262,7 @@ <h2 id="toc-title">Table of contents</h2>
<div>
<div class="quarto-title-meta-heading">Published</div>
<div class="quarto-title-meta-contents">
<p class="date">February 22, 2024</p>
<p class="date">February 23, 2024</p>
</div>
</div>

Expand Down
6 changes: 3 additions & 3 deletions docs/search.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</url>
<url>
<loc>https://gdsl-ul.github.io/san/01-overview.html</loc>
<lastmod>2024-02-22T23:11:18.674Z</lastmod>
<lastmod>2024-02-23T07:05:20.384Z</lastmod>
</url>
<url>
<loc>https://gdsl-ul.github.io/san/02-spatial_data.html</loc>
Expand Down

0 comments on commit b228b53

Please sign in to comment.