From 4e06765e4c7147c38ee127c62a605ad8f84616ec Mon Sep 17 00:00:00 2001 From: callummole Date: Mon, 26 Sep 2022 17:26:55 +0100 Subject: [PATCH] initial working iframe --- coursebook/_config.yml | 2 + coursebook/modules/m4/4.1_What_and_Why.ipynb | 139 +++++++++++++++---- 2 files changed, 111 insertions(+), 30 deletions(-) diff --git a/coursebook/_config.yml b/coursebook/_config.yml index 9f1c5082..e58d44cc 100644 --- a/coursebook/_config.yml +++ b/coursebook/_config.yml @@ -23,8 +23,10 @@ latex: # added for plotly: https://jupyterbook.org/interactive/interactive.html?highlight=plotly sphinx: config: + html_extra_path: ['slides'] html_js_files: - https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js + # Information about where the book exists on the web repository: diff --git a/coursebook/modules/m4/4.1_What_and_Why.ipynb b/coursebook/modules/m4/4.1_What_and_Why.ipynb index 5018b85a..5dcf0f0d 100644 --- a/coursebook/modules/m4/4.1_What_and_Why.ipynb +++ b/coursebook/modules/m4/4.1_What_and_Why.ipynb @@ -3,7 +3,11 @@ { "cell_type": "markdown", "id": "382bf695", - "metadata": {}, + "metadata": { + "slideshow": { + "slide_type": "slide" + } + }, "source": [ "(section4.1)=\n", "# 4.1 The What and Why of Statistical Modelling\n", @@ -63,6 +67,9 @@ "execution_count": 27, "id": "63110536", "metadata": { + "slideshow": { + "slide_type": "slide" + }, "tags": [ "remove-cell" ] @@ -110,7 +117,11 @@ { "cell_type": "markdown", "id": "31f7c4e1", - "metadata": {}, + "metadata": { + "slideshow": { + "slide_type": "slide" + } + }, "source": [ "```{figure} ../../figures/4.1_1.svg\n", "---\n", @@ -124,7 +135,11 @@ { "cell_type": "markdown", "id": "d8b8b409", - "metadata": {}, + "metadata": { + "slideshow": { + "slide_type": "slide" + } + }, "source": [ "\n", "\n", @@ -189,7 +204,11 @@ "cell_type": "code", "execution_count": 2, "id": "8d9fb506", - "metadata": {}, + "metadata": { + "slideshow": { + "slide_type": "slide" + } + }, "outputs": [ { "name": "stdout", @@ -214,7 +233,11 @@ { "cell_type": "markdown", "id": "d07f0d51", - "metadata": {}, + "metadata": { + "slideshow": { + "slide_type": "subslide" + } + }, "source": [ "With a big enough sample the amount of people choosing chocolate will always rest at our chosen parameter.\n", "\n", @@ -227,7 +250,11 @@ "cell_type": "code", "execution_count": 3, "id": "633570f9", - "metadata": {}, + "metadata": { + "slideshow": { + "slide_type": "slide" + } + }, "outputs": [ { "data": { @@ -269,7 +296,11 @@ { "cell_type": "markdown", "id": "94f9c099", - "metadata": {}, + "metadata": { + "slideshow": { + "slide_type": "slide" + } + }, "source": [ "## Sampling bias and the Central Limit Theorem\n", "\n", @@ -286,7 +317,11 @@ "cell_type": "code", "execution_count": 10, "id": "2ce3e7d2", - "metadata": {}, + "metadata": { + "slideshow": { + "slide_type": "fragment" + } + }, "outputs": [ { "data": { @@ -321,7 +356,11 @@ { "cell_type": "markdown", "id": "a17db510", - "metadata": {}, + "metadata": { + "slideshow": { + "slide_type": "subslide" + } + }, "source": [ "The intuition behind the Central Limit Theorem is two fold:\n", "- The more ways a thing can happen, the more likely it is to happen.\n", @@ -336,7 +375,11 @@ "cell_type": "code", "execution_count": 5, "id": "8fe828d4", - "metadata": {}, + "metadata": { + "slideshow": { + "slide_type": "subslide" + } + }, "outputs": [ { "data": { @@ -377,7 +420,11 @@ { "cell_type": "markdown", "id": "1c95c752", - "metadata": {}, + "metadata": { + "slideshow": { + "slide_type": "slide" + } + }, "source": [ "## Statistical Learning\n", "\n", @@ -399,6 +446,9 @@ "execution_count": 25, "id": "1bced86c", "metadata": { + "slideshow": { + "slide_type": "skip" + }, "tags": [ "remove-cell" ] @@ -437,7 +487,11 @@ { "cell_type": "markdown", "id": "7516a7bf", - "metadata": {}, + "metadata": { + "slideshow": { + "slide_type": "skip" + } + }, "source": [ "```{figure} ../../figures/4.1_2.svg\n", "---\n", @@ -451,7 +505,11 @@ { "cell_type": "markdown", "id": "35916325", - "metadata": {}, + "metadata": { + "slideshow": { + "slide_type": "skip" + } + }, "source": [ "In this section we have learned the theoretical building blocks of modelling. In the next section we will peek inside a model and learn how a model represents data." ] @@ -459,7 +517,11 @@ { "cell_type": "markdown", "id": "f1f6b424", - "metadata": {}, + "metadata": { + "slideshow": { + "slide_type": "slide" + } + }, "source": [ "### References and Further Reading\n", "\n", @@ -479,26 +541,43 @@ ] }, { - "cell_type": "markdown", - "id": "899c9288", - "metadata": {}, + "cell_type": "code", + "execution_count": 12, + "id": "28287b79", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + " \n", + " " + ], + "text/plain": [ + "" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - " " + "from IPython.display import IFrame\n", + "IFrame(\"../../4.1_What_and_Why.slides.html\", width=400, height=300, allow=\"fullscreen\")" ] } ], "metadata": { - "celltoolbar": "Edit Metadata", + "celltoolbar": "Slideshow", "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", @@ -514,7 +593,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.6" + "version": "3.9.5" } }, "nbformat": 4,