Skip to content

Commit

Permalink
#14 from jhrcook/final-details
Browse files Browse the repository at this point in the history
Final details
  • Loading branch information
jhrcook authored Dec 3, 2021
2 parents 874fd94 + 9f9ff52 commit 21997ea
Show file tree
Hide file tree
Showing 41 changed files with 31,735 additions and 1,351 deletions.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: munge download_data docs
.PHONY:

# Need to specify bash in order for conda activate to work.
SHELL=/bin/bash
Expand All @@ -7,6 +7,13 @@ help:
@echo "available commands"
@echo " - help : information about available commands"
@echo " - render : render the distill website"
@echo " - notebooks : run Notes and Assignment Rmd"
@echo " - build : run all Rmd and render the site"

render:
Rscript -e "rmarkdown::render_site()" && rm -r docs/data

notebooks:
Rscript run-all-notebooks.R

build: notebooks render
16 changes: 14 additions & 2 deletions about.Rmd
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
---
title: "About this site"
title: "About"
description: |
Some additional details about the website
Some additional details about this website and it's author.
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```

## The website

This site is built with ['distill'](https://rstudio.github.io/distill/) and deployed on GitHub pages.
The main point of the website is to display my course notes in a easy to read and search format.
It isn't perfect nor optimal, but there is a good balance of functionality and simplicity.

## About me

My name is Joshua Cook and I am (at the time of taking this course and writing this About page) a graduate student at Harvard Medical School.
My research is on cancer genetics and I have a specific love of Bayesian modelling.
You can peruse more of my projects and other work on my GitHub profile at [jhrcook](https://github.com/jhrcook) or my [website](https://joshuacook.netlify.app).
1,038 changes: 1,028 additions & 10 deletions assignments/jhcook-assignment-01.html

Large diffs are not rendered by default.

1,044 changes: 1,033 additions & 11 deletions assignments/jhcook-assignment-02.html

Large diffs are not rendered by default.

1,040 changes: 1,029 additions & 11 deletions assignments/jhcook-assignment-03.html

Large diffs are not rendered by default.

1,088 changes: 1,054 additions & 34 deletions assignments/jhcook-assignment-04.html

Large diffs are not rendered by default.

1,117 changes: 1,071 additions & 46 deletions assignments/jhcook-assignment-05.html

Large diffs are not rendered by default.

1,281 changes: 1,089 additions & 192 deletions assignments/jhcook-assignment-06.html

Large diffs are not rendered by default.

2,374 changes: 2,202 additions & 172 deletions assignments/jhcook-assignment-07.html

Large diffs are not rendered by default.

146 changes: 76 additions & 70 deletions assignments/jhcook-assignment-08.html

Large diffs are not rendered by default.

87 changes: 46 additions & 41 deletions assignments/jhcook-assignment-09.html
Original file line number Diff line number Diff line change
Expand Up @@ -3619,7 +3619,7 @@ <h2 id="exercise-1.-decision-analysis-for-the-factory-data">Exercise 1. Decision
#&gt; mu[6] 1
#&gt; sigma 1
#&gt;
#&gt; Samples were drawn using NUTS(diag_e) at Thu Nov 18 07:08:39 2021.
#&gt; Samples were drawn using NUTS(diag_e) at Fri Dec 3 07:32:59 2021.
#&gt; For each parameter, n_eff is a crude measure of effective sample size,
#&gt; and Rhat is the potential scale reduction factor on split chains (at
#&gt; convergence, Rhat=1).</code></pre>
Expand All @@ -3631,15 +3631,15 @@ <h2 id="exercise-1.-decision-analysis-for-the-factory-data">Exercise 1. Decision

<span class="va">tidy_factory_measure_matrix</span> <span class="op">&lt;-</span> <span class="kw">function</span><span class="op">(</span><span class="va">factory_mat</span><span class="op">)</span> <span class="op">{</span>
<span class="fu"><a href="https://rdrr.io/r/base/as.data.frame.html">as.data.frame</a></span><span class="op">(</span><span class="va">factory_mat</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu">set_names</span><span class="op">(</span><span class="fu"><a href="https://glue.tidyverse.org/reference/glue.html">glue</a></span><span class="op">(</span><span class="st">&quot;machine {seq(ncol(factory_mat))}&quot;</span><span class="op">)</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://magrittr.tidyverse.org/reference/aliases.html">set_names</a></span><span class="op">(</span><span class="fu"><a href="https://glue.tidyverse.org/reference/glue.html">glue</a></span><span class="op">(</span><span class="st">&quot;machine {seq(ncol(factory_mat))}&quot;</span><span class="op">)</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu">pivot_longer</span><span class="op">(</span><span class="op">-</span><span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="op">)</span>, names_to <span class="op">=</span> <span class="st">&quot;machine&quot;</span>, values_to <span class="op">=</span> <span class="st">&quot;quality_measurement&quot;</span><span class="op">)</span>
<span class="op">}</span>

<span class="va">factory_long</span> <span class="op">&lt;-</span> <span class="fu">tidy_factory_measure_matrix</span><span class="op">(</span><span class="va">factory</span><span class="op">)</span>

<span class="fu">tidy_factory_measure_matrix</span><span class="op">(</span><span class="va">factory_ypred</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu">ggplot</span><span class="op">(</span><span class="fu">aes</span><span class="op">(</span>x <span class="op">=</span> <span class="va">quality_measurement</span><span class="op">)</span><span class="op">)</span> <span class="op">+</span>
<span class="fu">facet_wrap</span><span class="op">(</span><span class="fu">vars</span><span class="op">(</span><span class="va">machine</span><span class="op">)</span>, nrow <span class="op">=</span> <span class="fl">2</span>, scales <span class="op">=</span> <span class="st">&quot;free&quot;</span><span class="op">)</span> <span class="op">+</span>
<span class="fu">facet_wrap</span><span class="op">(</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/vars.html">vars</a></span><span class="op">(</span><span class="va">machine</span><span class="op">)</span>, nrow <span class="op">=</span> <span class="fl">2</span>, scales <span class="op">=</span> <span class="st">&quot;free&quot;</span><span class="op">)</span> <span class="op">+</span>
<span class="fu">geom_density</span><span class="op">(</span>fill <span class="op">=</span> <span class="st">&quot;black&quot;</span>, alpha <span class="op">=</span> <span class="fl">0.1</span><span class="op">)</span> <span class="op">+</span>
<span class="fu">geom_rug</span><span class="op">(</span>data <span class="op">=</span> <span class="va">factory_long</span>, color <span class="op">=</span> <span class="st">&quot;blue&quot;</span><span class="op">)</span> <span class="op">+</span>
<span class="fu">scale_x_continuous</span><span class="op">(</span>expand <span class="op">=</span> <span class="fu">expansion</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="fl">0</span>, <span class="fl">0</span><span class="op">)</span><span class="op">)</span><span class="op">)</span> <span class="op">+</span>
Expand Down Expand Up @@ -3792,10 +3792,9 @@ <h2 id="exercise-1.-decision-analysis-for-the-factory-data">Exercise 1. Decision
</div>
<pre><code>#&gt; R version 4.1.2 (2021-11-01)
#&gt; Platform: x86_64-apple-darwin17.0 (64-bit)
#&gt; Running under: macOS Big Sur 10.16
#&gt; Running under: macOS Big Sur 11.6
#&gt;
#&gt; Matrix products: default
#&gt; BLAS: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRblas.0.dylib
#&gt; LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
#&gt;
#&gt; locale:
Expand All @@ -3806,44 +3805,50 @@ <h2 id="exercise-1.-decision-analysis-for-the-factory-data">Exercise 1. Decision
#&gt; [7] base
#&gt;
#&gt; other attached packages:
#&gt; [1] forcats_0.5.1 stringr_1.4.0 dplyr_1.0.7
#&gt; [4] purrr_0.3.4 readr_2.0.1 tidyr_1.1.3
#&gt; [7] tibble_3.1.3 tidyverse_1.3.1 tidybayes_3.0.1
#&gt; [10] rstan_2.21.2 ggplot2_3.3.5 StanHeaders_2.21.0-7
#&gt; [13] glue_1.4.2
#&gt; [1] loo_2.4.1 bayestestR_0.11.0 magrittr_2.0.1
#&gt; [4] bayesplot_1.8.1 aaltobda_0.3.1 tidybayes_3.0.1
#&gt; [7] rstan_2.21.2 StanHeaders_2.21.0-7 forcats_0.5.1
#&gt; [10] stringr_1.4.0 dplyr_1.0.7 purrr_0.3.4
#&gt; [13] readr_2.0.1 tidyr_1.1.3 tibble_3.1.3
#&gt; [16] ggplot2_3.3.5 tidyverse_1.3.1 patchwork_1.1.1
#&gt; [19] ggtext_0.1.1 glue_1.4.2
#&gt;
#&gt; loaded via a namespace (and not attached):
#&gt; [1] matrixStats_0.61.0 fs_1.5.0 lubridate_1.7.10
#&gt; [4] webshot_0.5.2 httr_1.4.2 rprojroot_2.0.2
#&gt; [7] tensorA_0.36.2 tools_4.1.2 backports_1.2.1
#&gt; [10] bslib_0.2.5.1 utf8_1.2.2 R6_2.5.0
#&gt; [13] DBI_1.1.1 colorspace_2.0-2 ggdist_3.0.0
#&gt; [16] withr_2.4.2 tidyselect_1.1.1 gridExtra_2.3
#&gt; [19] prettyunits_1.1.1 processx_3.5.2 downlit_0.2.1
#&gt; [22] curl_4.3.2 compiler_4.1.2 cli_3.0.1
#&gt; [25] rvest_1.0.1 arrayhelpers_1.1-0 xml2_1.3.2
#&gt; [28] labeling_0.4.2 posterior_1.1.0 sass_0.4.0
#&gt; [31] scales_1.1.1 checkmate_2.0.0 aaltobda_0.3.1
#&gt; [34] callr_3.7.0 systemfonts_1.0.3 digest_0.6.27
#&gt; [37] svglite_2.0.0 rmarkdown_2.10 pkgconfig_2.0.3
#&gt; [40] htmltools_0.5.1.1 highr_0.9 dbplyr_2.1.1
#&gt; [43] rlang_0.4.11 readxl_1.3.1 rstudioapi_0.13
#&gt; [46] jquerylib_0.1.4 farver_2.1.0 generics_0.1.0
#&gt; [49] svUnit_1.0.6 jsonlite_1.7.2 distill_1.2
#&gt; [52] distributional_0.2.2 inline_0.3.19 magrittr_2.0.1
#&gt; [55] kableExtra_1.3.4 loo_2.4.1 Rcpp_1.0.7
#&gt; [58] munsell_0.5.0 fansi_0.5.0 abind_1.4-5
#&gt; [61] lifecycle_1.0.0 stringi_1.7.3 yaml_2.2.1
#&gt; [64] pkgbuild_1.2.0 grid_4.1.2 parallel_4.1.2
#&gt; [67] crayon_1.4.1 lattice_0.20-45 haven_2.4.3
#&gt; [70] hms_1.1.0 knitr_1.33 ps_1.6.0
#&gt; [73] pillar_1.6.2 codetools_0.2-18 clisymbols_1.2.0
#&gt; [76] stats4_4.1.2 reprex_2.0.1 evaluate_0.14
#&gt; [79] V8_3.4.2 renv_0.14.0 RcppParallel_5.1.4
#&gt; [82] modelr_0.1.8 vctrs_0.3.8 tzdb_0.1.2
#&gt; [85] cellranger_1.1.0 gtable_0.3.0 assertthat_0.2.1
#&gt; [88] xfun_0.25 broom_0.7.9 coda_0.19-4
#&gt; [91] viridisLite_0.4.0 ellipsis_0.3.2 here_1.0.1</code></pre>
#&gt; [1] colorspace_2.0-2 ggridges_0.5.3 ellipsis_0.3.2
#&gt; [4] rsconnect_0.8.24 rprojroot_2.0.2 snakecase_0.11.0
#&gt; [7] markdown_1.1 fs_1.5.0 gridtext_0.1.4
#&gt; [10] rstudioapi_0.13 farver_2.1.0 bit64_4.0.5
#&gt; [13] svUnit_1.0.6 fansi_0.5.0 mvtnorm_1.1-2
#&gt; [16] lubridate_1.7.10 xml2_1.3.2 codetools_0.2-18
#&gt; [19] splines_4.1.2 downlit_0.2.1 knitr_1.33
#&gt; [22] jsonlite_1.7.2 LaplacesDemon_16.1.6 broom_0.7.9
#&gt; [25] dbplyr_2.1.1 ggdist_3.0.0 compiler_4.1.2
#&gt; [28] httr_1.4.2 backports_1.2.1 assertthat_0.2.1
#&gt; [31] Matrix_1.3-4 cli_3.0.1 htmltools_0.5.1.1
#&gt; [34] prettyunits_1.1.1 tools_4.1.2 coda_0.19-4
#&gt; [37] gtable_0.3.0 posterior_1.1.0 V8_3.4.2
#&gt; [40] Rcpp_1.0.7 cellranger_1.1.0 jquerylib_0.1.4
#&gt; [43] vctrs_0.3.8 svglite_2.0.0 nlme_3.1-153
#&gt; [46] insight_0.14.4 tensorA_0.36.2 xfun_0.25
#&gt; [49] ps_1.6.0 rvest_1.0.1 lifecycle_1.0.0
#&gt; [52] renv_0.14.0 MASS_7.3-54 scales_1.1.1
#&gt; [55] vroom_1.5.4 clisymbols_1.2.0 hms_1.1.0
#&gt; [58] parallel_4.1.2 inline_0.3.19 RColorBrewer_1.1-2
#&gt; [61] yaml_2.2.1 curl_4.3.2 gridExtra_2.3
#&gt; [64] sass_0.4.0 distill_1.2 stringi_1.7.3
#&gt; [67] highr_0.9 checkmate_2.0.0 pkgbuild_1.2.0
#&gt; [70] systemfonts_1.0.3 rlang_0.4.11 pkgconfig_2.0.3
#&gt; [73] matrixStats_0.61.0 distributional_0.2.2 evaluate_0.14
#&gt; [76] lattice_0.20-45 labeling_0.4.2 bit_4.0.4
#&gt; [79] processx_3.5.2 tidyselect_1.1.1 here_1.0.1
#&gt; [82] plyr_1.8.6 bookdown_0.23 R6_2.5.0
#&gt; [85] generics_0.1.0 DBI_1.1.1 pillar_1.6.2
#&gt; [88] haven_2.4.3 withr_2.4.2 mgcv_1.8-38
#&gt; [91] datawizard_0.2.1 abind_1.4-5 janitor_2.1.0
#&gt; [94] modelr_0.1.8 crayon_1.4.1 arrayhelpers_1.1-0
#&gt; [97] utf8_1.2.2 tzdb_0.1.2 rmarkdown_2.10
#&gt; [100] isoband_0.2.5
#&gt; [ reached getOption(&quot;max.print&quot;) -- omitted 12 entries ]</code></pre>
</div>
<div class="sourceCode" id="cb5"><pre class="sourceCode r distill-force-highlighting-css"><code class="sourceCode r"></code></pre></div>
<!--radix_placeholder_article_footer-->
Expand Down
9 changes: 8 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: munge download_data docs
.PHONY:

# Need to specify bash in order for conda activate to work.
SHELL=/bin/bash
Expand All @@ -7,6 +7,13 @@ help:
@echo "available commands"
@echo " - help : information about available commands"
@echo " - render : render the distill website"
@echo " - notebooks : run Notes and Assignment Rmd"
@echo " - build : run all Rmd and render the site"

render:
Rscript -e "rmarkdown::render_site()" && rm -r docs/data

notebooks:
Rscript run-all-notebooks.R

build: notebooks render
24 changes: 14 additions & 10 deletions docs/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,29 +86,29 @@
</style>

<!--radix_placeholder_meta_tags-->
<title>Bayesian Data Analysis course: About this site</title>
<title>Bayesian Data Analysis course: About</title>

<meta property="description" itemprop="description" content="Some additional details about the website"/>
<meta property="description" itemprop="description" content="Some additional details about this website and it&#39;s author."/>



<!-- https://developers.facebook.com/docs/sharing/webmasters#markup -->
<meta property="og:title" content="Bayesian Data Analysis course: About this site"/>
<meta property="og:title" content="Bayesian Data Analysis course: About"/>
<meta property="og:type" content="article"/>
<meta property="og:description" content="Some additional details about the website"/>
<meta property="og:description" content="Some additional details about this website and it&#39;s author."/>
<meta property="og:locale" content="en_US"/>
<meta property="og:site_name" content="Bayesian Data Analysis course"/>

<!-- https://dev.twitter.com/cards/types/summary -->
<meta property="twitter:card" content="summary"/>
<meta property="twitter:title" content="Bayesian Data Analysis course: About this site"/>
<meta property="twitter:description" content="Some additional details about the website"/>
<meta property="twitter:title" content="Bayesian Data Analysis course: About"/>
<meta property="twitter:description" content="Some additional details about this website and it&#39;s author."/>

<!--/radix_placeholder_meta_tags-->
<!--radix_placeholder_rmarkdown_metadata-->

<script type="text/json" id="radix-rmarkdown-metadata">
{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["title","description"]}},"value":[{"type":"character","attributes":{},"value":["About this site"]},{"type":"character","attributes":{},"value":["Some additional details about the website"]}]}
{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["title","description"]}},"value":[{"type":"character","attributes":{},"value":["About"]},{"type":"character","attributes":{},"value":["Some additional details about this website and it's author."]}]}
</script>
<!--/radix_placeholder_rmarkdown_metadata-->
<!--radix_placeholder_navigation_in_header-->
Expand Down Expand Up @@ -2362,7 +2362,7 @@ <h3>${suggestion.title}</h3>
<!--radix_placeholder_front_matter-->

<script id="distill-front-matter" type="text/json">
{"title":"About this site","description":"Some additional details about the website","authors":[]}
{"title":"About","description":"Some additional details about this website and it's author.","authors":[]}
</script>

<!--/radix_placeholder_front_matter-->
Expand Down Expand Up @@ -2441,14 +2441,18 @@ <h3>${suggestion.title}</h3>
<!--/radix_placeholder_site_before_body-->

<div class="d-title">
<h1>About this site</h1>
<h1>About</h1>
<!--radix_placeholder_categories-->
<!--/radix_placeholder_categories-->
<p><p>Some additional details about the website</p></p>
<p><p>Some additional details about this website and it’s author.</p></p>
</div>


<div class="d-article">
<h2 id="the-website">The website</h2>
<p>This site is built with <a href="https://rstudio.github.io/distill/">‘distill’</a> and deployed on GitHub pages. The main point of the website is to display my course notes in a easy to read and search format. It isn’t perfect nor optimal, but there is a good balance of functionality and simplicity.</p>
<h2 id="about-me">About me</h2>
<p>My name is Joshua Cook and I am (at the time of taking this course and writing this About page) a graduate student at Harvard Medical School. My research is on cancer genetics and I have a specific love of Bayesian modelling. You can peruse more of my projects and other work on my GitHub profile at <a href="https://github.com/jhrcook">jhrcook</a> or my <a href="https://joshuacook.netlify.app">website</a>.</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode r distill-force-highlighting-css"><code class="sourceCode r"></code></pre></div>
<!--radix_placeholder_article_footer-->
<!--/radix_placeholder_article_footer-->
Expand Down
1,038 changes: 1,028 additions & 10 deletions docs/assignments/jhcook-assignment-01.html

Large diffs are not rendered by default.

1,044 changes: 1,033 additions & 11 deletions docs/assignments/jhcook-assignment-02.html

Large diffs are not rendered by default.

Loading

0 comments on commit 21997ea

Please sign in to comment.