diff --git a/1_download_setup.qmd b/1_download_setup.qmd
index a4a8640..5db9fe5 100644
--- a/1_download_setup.qmd
+++ b/1_download_setup.qmd
@@ -17,6 +17,10 @@ using DataFrames, Random, StatsPlots, Plots
## Downloading and Installing Julia and VSCode
+::: {.callout-caution}
+This is a test
+:::
+
**Julia**
Navigate to [this page](https://julialang.org/downloads/) and follow the platform-specific instructions to download and install Julia (we recommend installing the current stable release).
diff --git a/_freeze/1_download_setup/execute-results/html.json b/_freeze/1_download_setup/execute-results/html.json
index a26ba20..f090282 100644
--- a/_freeze/1_download_setup/execute-results/html.json
+++ b/_freeze/1_download_setup/execute-results/html.json
@@ -1,8 +1,8 @@
{
- "hash": "1c99d2294462e383472fc843d253e1f3",
+ "hash": "ab96666c90eb9e83161e81e629e3f008",
"result": {
"engine": "julia",
- "markdown": "---\ntitle: \"Tutorial 1: Downloads, Setups and Your First Project\"\ndate: last-modified\nauthor: \"Danet and Becks, based on originals by Delmas and Griffiths\"\nformat:\n html:\n embed-resources: true\ntitle-block-banner: true\nengine: julia\n---\n\n\n\n\n\n\n## Downloading and Installing Julia and VSCode\n\n**Julia**\n\nNavigate to [this page](https://julialang.org/downloads/) and follow the platform-specific instructions to download and install Julia (we recommend installing the current stable release).\n\nDuring the installation process, you may be prompted to add Julia to the PATH, this box should be ticked.\n\n::: {.callout-tip collapse=\"true\"}\n## Using Juliaup\n\n[Juliaup](https://github.com/JuliaLang/juliaup) is an alternative platform to install and manage multiple versions of Julia you run on your computer. This is useful if you need to run different versions of Julia for different projects but probably not essential for a casual Julia user, although there is also something to be said about setting yourself up with the best toys on the market...\n::: \n\n**VSCode**\n\nNavigate to [this page](https://visualstudio.microsoft.com/) to download and install your platform specific Visual Studio Code (not Visual Studio or Visual Studio for Mac).\n\n## Setting Up VSCode to use Julia\n\nVS Code is a free source-code editor, allowing you to code in multiple coding languages all from a platform that is completely customisable to the user - think of it as a more language agnostic version of RStudio. This flexibility is great but it does mean that you need to spend time telling VS Code what it is you want to do and how. This is where extensions come in; extensions are higher level packages that permit the use of a given coding language like Julia, edit your themes and icons, provide helpful applications like spell checker or Bracket Pair Colorizer, and for adding your own [VS Code pets](https://tonybaloney.github.io/vscode-pets/usage) (a very important part of the VSCode experience).\n\nTo install Julia in VS Code do the following (you only need to do this once):\n\n1. open VS Code (you'll see the welcome page)\n2. navigate to the 'Marketplace' (5th symbol down in the activity bar - vertical panel on the lefthand side of the screen)\n\n\n\n3. search for Julia in the 'Search Extensions in Marketplace' search bar\n4. install `Julia`, this extension provides support for the Julia programming language and install `Julia Formatter`, this extension will help you write clean code that is easier to read\n\n\n\n## Making your first Julia project\n\nAs with working in R and RStudio, we advocate working in a contained project environment when using Julia. Each unique project may require a different setup (e.g. packages, package versions, working directories, data locations, etc.).\n\nTo set up a project in VS Code:\n\n1. Creating a folder at a location of your choosing (e.g. within your Documents folder). This can be on GoogleDrive, Dropbox or OneDrive. This is OK.\n\n2. Name the folder with relevant works. Here we will use `Julia - VS code - how to`.\n\n3. Navigate to VSCode and open your new project by clicking on the 'Explorer' symbol (top left symbol on the activity bar) and click Open Folder and navigate your finder or explorer to the `Julia - VS code - how to` folder.\n\n - this folder becomes the working directory (same as when using an `.RProject` in R)\n\n\n\n4. Create a new file (a script) in your directory: do this by using cmd-N (mac) or ctrl-N (windows) or File -\\> New File or by left clicking -\\> New File within the directory pane\n\n5. Name your script as your see fit but please remember to include the .jl file extension (e.g. JuliaTuto.jl). the .jl file extension tells VS Code you want to use the Julia programming language. To save your script at any time use cmd-S (MAC) OR ctrl-S (windows) or File \\> Save.\n\n - Note, you can also open a project in VS Code by right-clicking on your folder (in Finder, Windows file explorer or Linux nautilus) and selecting Open with -\\> Other -\\> VS Code.\n\n### Activating the REPL and running some code.\n\nThis sequence of figures aligns with the instructions below.\n\n\n\nNow that you have an active project and a new script file you can open the Julia REPL. REPL stands for *read, execute, print and loop*. The REPL is like the console in R and is where the magic happens. In Eva's words, it's VS Code's way of using Julia for a brain.\n\nTo do this you type F1 or cmd/ctrl - shift-p or View -\\> Command Palette and choose Julia REPL. The command palette will appear as a drop down menu with a search function at the top of the page.\n\nNow that you have an interface with Julia as a brain, you can actually do something! Try this: type `print(\"Hello world\")` in the REPL and press Enter/Return. If you've done all of the above correctly, Hello world should print in the REPL.\n\nNow, you can also make a 'script'. Type ctrl-n or cmd-n and a document will open at the top. There will be a prompt/link to select your language. Click the link and, yes, search for and choose Julia.\n\nNext, type `print(\"Hello world\")` in the script. Just like RStudio, you can send the information in the script to the REPL. There are two ways to do this. First, and probably what you'll want, is shift-enter(return). This will send the line of code you are on, and move to the next line. ctrl-enter(return) submits the line but does not move the cursor. Try it!\n\n## Activating your project, the Project.toml and Manifest.toml\n\nWe mentioned above that it is good practice to work within an environment specific to each project. The Julia package manager (`Pkg`) allows you to do that easily: Unlike traditional package managers, which install and manage a single global set of packages, `Pkg` is designed around environments: independent sets of packages that can be local to an individual project or shared and selected by name (text taken directly from the documentation).\n\n### Getting started: activating your project.\n\nActivating your project is something that only needs doing once per computer. It allows you to add packages and dependencies to the project.\n\nIf you move the project to a new computer, or share the project, activation will be needed again.\n\nThere are two ways to activate your project.\n\n1. type `Pkg.activate(\".\")` in the REPL.\n2. type `]` in the REPL and then `activate .`\n\nThe `]` is a shorthand for using the `Pkg` package and opens the package manager. To get out of this, you press the `backspace/delete` button on your keyboard.\n\nThere are two ways to double check that you are actually working within your project:\n\n- check/click the 'Julia env:...' on the bottom of your screen (blue bar), it should match your project name\n\n- enter the package manager by typing `]` in the Julia REPL, you should see (your-project-name) pkg\\> instead of julia\\>. Again, exit the package manager using `backspace/delete` button.\n\n### Working with the package manager and growing the project and manifest files\n\nOnce your project is activated, there are two ways to use the package manager (Pkg):\n\n1. directly from the REPL:\n\n- navigate to the REPL\n- type `]`\n- you will see that instead of seeing julia\\> you now see (your-project-name) pkg\\>, indicating that all the packages that you now install (or update) will be installed (or updated) within this specific project\n- to add a package, use the function `add`: `] add Plots`\n\n2. using `Pkg` (this is useful when you want to install packages or manage them from within your script):\n\n- first type `import Pkg` and execute this line using shift-Enter\n- on subsequent lines, add, remove and update packages from your script using `Pkg` functions such as `Pkg.add()`, `Pkg.remove()` or `Pkg.update()`.\n- To add a packages, the name of the package need to be written with quotes (`Pkg.add(\"Plots\")`).\n\n#### An example using the Plots package\n\nNow that we are all set up, we are going to install a package, check the project's status and remove a package. As this might be your first time installing a package (e.g., Plots), don't be concerned if it takes a couple of minutes to run.\n\n- type `] add Plots` in the REPL (or `Pkg.add(\"Plots\")`) in your script and execute using Ctrl-Enter.\n - you just installed the Plots package and a whole bunch of dependencies that Plots needs to work. This is equivalent to Base plots in R.\n\n\n\n- type `] st` in the REPL. This will check the status of your project and print the content of your Project.toml file, which is the list of main packages, in this case, just Plots.\n\nyou should see something like:\n\n\n\n::: {.callout-tip}\n## Tip\n\nPackages can removed in the same way i.e. `] rm Plots` (or `Pkg.rm(\"Plots\")`) will remove the Plots package from your project environment (and its record in the Project.toml and Manifest.toml files)\n::: \n\n## Gearing up to Do More Stuff (what packages do I need).\n\nThere are a core set of packages we use for all of our work. These 10 packages are almost always installed when we make a project.\n\nGo ahead and use either the `]` or `Pkg.add(\"package.name\")` method to add all of these to your project.\n\n#### For working with data\n\n`CSV` `DataFrames` `DelimitedFiles`\n\n#### For plotting\n\n`Plots`\n\n#### For statistical things\n\n`Distributions` `Random` `Statistics` `StatsBase` `StatsPlots`\n\n#### For Modelling\n\n`DifferentialEquations`\n\n## Your first script setup.\n\nAt this stage, you should have a good understanding about how to create a project folder, activate a project, start the REPL, open a script and add packages to the project.\n\nNow you are ready to 'setup' your first script.\n\n1. create a new script file (ctrl-n or cmd-n).\n2. choose Julia as the language\n3. Type some informative information at the top of the script\n a. just like in R and other programming languages, the `#` is a commenter.\n4. The first section of your script is where you declare the packages you'll be using.\n a. the function to do this is `using`.\n b. make Plots, Random and DataFrames available.\n\nNow you are ready to do something really simple. Let's make some variables, data frames and a few simple plots.\n\nFirst, lets get the setup sorted and packages available\n\n\n\n\n::: {#4 .cell execution_count=1}\n``` {.julia .cell-code}\n# This is my first example script\n# 25 Jan 2023\n\n# packages I need\nusing DataFrames, Plots, Random, StatsPlots\n```\n:::\n\n\n\n\n\n\nSecond, let's make some variables and see how Julia prints them to the screen\n\n\n\n\n::: {#6 .cell execution_count=1}\n``` {.julia .cell-code}\n# make two variables using the rand function\n# because we are using random numbers, we'll set the seed here for reproducibility\n\nRandom.seed!(12345)\n\nx = rand(10)\ny = rand(10)\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```\n10-element Vector{Float64}:\n 0.3302627700323072\n 0.4219866389257305\n 0.6853069230253171\n 0.29579983859112813\n 0.9736588395655787\n 0.24458973555203245\n 0.46875054050900267\n 0.27705458732580956\n 0.6299157011197652\n 0.12180466275080659\n```\n:::\n:::\n\n\n\n\n\n\nCool. Now, lets create two data frames, one made of the x and y variables, and another with three variables made directly in a call to `DataFrame`.\n\n\n\n\n::: {#8 .cell execution_count=1}\n``` {.julia .cell-code}\n# combine into a data frame using the DataFrame function\ndf = DataFrame(x = x, y = y)\ndf\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```{=html}\n
10×2 DataFrame
Row
x
y
Float64
Float64
1
0.791805
0.330263
2
0.159579
0.421987
3
0.334191
0.685307
4
0.811392
0.2958
5
0.796629
0.973659
6
0.917814
0.24459
7
0.311327
0.468751
8
0.752906
0.277055
9
0.633848
0.629916
10
0.899951
0.121805
\n```\n:::\n:::\n\n\n\n\n\n\n...and the second\n\n\n\n\n::: {#10 .cell execution_count=1}\n``` {.julia .cell-code}\n# make a second data frame with three variables\n# using DataFrame directly to create variables\ndf2 = DataFrame(a=1:10, b=10*rand(10), c=10*rand(10))\ndf2\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```{=html}\n
10×3 DataFrame
Row
a
b
c
Int64
Float64
Float64
1
1
0.563403
9.77384
2
2
7.22679
3.58869
3
3
0.466642
3.76688
4
4
4.59489
9.03599
5
5
0.491108
8.73964
6
6
6.99192
1.36299
7
7
1.58122
0.815793
8
8
4.70745
3.75399
9
9
4.97572
0.599761
10
10
4.58675
2.14792
\n```\n:::\n:::\n\n\n\n\n\n\nGreat. Now, lets see how to plot the 'solo' variables. Note how we specify the `seriestype`. Try getting rid of this....\n\n\n\n\n::: {#12 .cell execution_count=1}\n``` {.julia .cell-code}\n# plot the data using x and y, as a scatterplot\nplot(x, y, seriestype=:scatter)\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```{=html}\n\n\n```\n:::\n:::\n\n\n\n\n\n\nSuperb. So, `StatsPlots` provides a special macro to use a dataframe with plots. It's a three step process:\n\n1. declare the `@df` macro\n2. define the data frame\n3. declare the columns, using the `:`\n\n\n\n\n::: {#14 .cell execution_count=1}\n``` {.julia .cell-code}\n# plot the data using the data frame macro\n# declare the df macro, declare the data frame, use : to signify columns\n@df df plot(:x, :y)\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```{=html}\n\n\n```\n:::\n:::\n\n\n\n\n\n\nAnd here, we use the df2, and plot variable b and c vs. a.\n\n\n\n\n::: {#16 .cell execution_count=1}\n``` {.julia .cell-code}\n# the same, and plotting two y variables\n@df df2 plot(:a, [:b, :c])\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```{=html}\n\n\n```\n:::\n:::\n\n\n\n\n\n\n#### A quick briefing about data frames in Julia versus R and dplyr is here\n\n[DataFrames Comparison R dplyr](https://dataframes.juliadata.org/stable/man/comparisons/#Comparison-with-the-R-package-dplyr)\n\n",
+ "markdown": "---\ntitle: \"Tutorial 1: Downloads, Setups and Your First Project\"\ndate: last-modified\nauthor: \"Danet and Becks, based on originals by Delmas and Griffiths\"\nformat:\n html:\n embed-resources: true\ntitle-block-banner: true\nengine: julia\n---\n\n\n\n\n\n\n## Downloading and Installing Julia and VSCode\n\n::: {.callout-caution}\nThis is a test\n::: \n\n**Julia**\n\nNavigate to [this page](https://julialang.org/downloads/) and follow the platform-specific instructions to download and install Julia (we recommend installing the current stable release).\n\nDuring the installation process, you may be prompted to add Julia to the PATH, this box should be ticked.\n\n::: {.callout-tip collapse=\"true\"}\n## Using Juliaup\n\n[Juliaup](https://github.com/JuliaLang/juliaup) is an alternative platform to install and manage multiple versions of Julia you run on your computer. This is useful if you need to run different versions of Julia for different projects but probably not essential for a casual Julia user, although there is also something to be said about setting yourself up with the best toys on the market...\n::: \n\n**VSCode**\n\nNavigate to [this page](https://visualstudio.microsoft.com/) to download and install your platform specific Visual Studio Code (not Visual Studio or Visual Studio for Mac).\n\n## Setting Up VSCode to use Julia\n\nVS Code is a free source-code editor, allowing you to code in multiple coding languages all from a platform that is completely customisable to the user - think of it as a more language agnostic version of RStudio. This flexibility is great but it does mean that you need to spend time telling VS Code what it is you want to do and how. This is where extensions come in; extensions are higher level packages that permit the use of a given coding language like Julia, edit your themes and icons, provide helpful applications like spell checker or Bracket Pair Colorizer, and for adding your own [VS Code pets](https://tonybaloney.github.io/vscode-pets/usage) (a very important part of the VSCode experience).\n\nTo install Julia in VS Code do the following (you only need to do this once):\n\n1. open VS Code (you'll see the welcome page)\n2. navigate to the 'Marketplace' (5th symbol down in the activity bar - vertical panel on the lefthand side of the screen)\n\n\n\n3. search for Julia in the 'Search Extensions in Marketplace' search bar\n4. install `Julia`, this extension provides support for the Julia programming language and install `Julia Formatter`, this extension will help you write clean code that is easier to read\n\n\n\n## Making your first Julia project\n\nAs with working in R and RStudio, we advocate working in a contained project environment when using Julia. Each unique project may require a different setup (e.g. packages, package versions, working directories, data locations, etc.).\n\nTo set up a project in VS Code:\n\n1. Creating a folder at a location of your choosing (e.g. within your Documents folder). This can be on GoogleDrive, Dropbox or OneDrive. This is OK.\n\n2. Name the folder with relevant works. Here we will use `Julia - VS code - how to`.\n\n3. Navigate to VSCode and open your new project by clicking on the 'Explorer' symbol (top left symbol on the activity bar) and click Open Folder and navigate your finder or explorer to the `Julia - VS code - how to` folder.\n\n - this folder becomes the working directory (same as when using an `.RProject` in R)\n\n\n\n4. Create a new file (a script) in your directory: do this by using cmd-N (mac) or ctrl-N (windows) or File -\\> New File or by left clicking -\\> New File within the directory pane\n\n5. Name your script as your see fit but please remember to include the .jl file extension (e.g. JuliaTuto.jl). the .jl file extension tells VS Code you want to use the Julia programming language. To save your script at any time use cmd-S (MAC) OR ctrl-S (windows) or File \\> Save.\n\n - Note, you can also open a project in VS Code by right-clicking on your folder (in Finder, Windows file explorer or Linux nautilus) and selecting Open with -\\> Other -\\> VS Code.\n\n### Activating the REPL and running some code.\n\nThis sequence of figures aligns with the instructions below.\n\n\n\nNow that you have an active project and a new script file you can open the Julia REPL. REPL stands for *read, execute, print and loop*. The REPL is like the console in R and is where the magic happens. In Eva's words, it's VS Code's way of using Julia for a brain.\n\nTo do this you type F1 or cmd/ctrl - shift-p or View -\\> Command Palette and choose Julia REPL. The command palette will appear as a drop down menu with a search function at the top of the page.\n\nNow that you have an interface with Julia as a brain, you can actually do something! Try this: type `print(\"Hello world\")` in the REPL and press Enter/Return. If you've done all of the above correctly, Hello world should print in the REPL.\n\nNow, you can also make a 'script'. Type ctrl-n or cmd-n and a document will open at the top. There will be a prompt/link to select your language. Click the link and, yes, search for and choose Julia.\n\nNext, type `print(\"Hello world\")` in the script. Just like RStudio, you can send the information in the script to the REPL. There are two ways to do this. First, and probably what you'll want, is shift-enter(return). This will send the line of code you are on, and move to the next line. ctrl-enter(return) submits the line but does not move the cursor. Try it!\n\n## Activating your project, the Project.toml and Manifest.toml\n\nWe mentioned above that it is good practice to work within an environment specific to each project. The Julia package manager (`Pkg`) allows you to do that easily: Unlike traditional package managers, which install and manage a single global set of packages, `Pkg` is designed around environments: independent sets of packages that can be local to an individual project or shared and selected by name (text taken directly from the documentation).\n\n### Getting started: activating your project.\n\nActivating your project is something that only needs doing once per computer. It allows you to add packages and dependencies to the project.\n\nIf you move the project to a new computer, or share the project, activation will be needed again.\n\nThere are two ways to activate your project.\n\n1. type `Pkg.activate(\".\")` in the REPL.\n2. type `]` in the REPL and then `activate .`\n\nThe `]` is a shorthand for using the `Pkg` package and opens the package manager. To get out of this, you press the `backspace/delete` button on your keyboard.\n\nThere are two ways to double check that you are actually working within your project:\n\n- check/click the 'Julia env:...' on the bottom of your screen (blue bar), it should match your project name\n\n- enter the package manager by typing `]` in the Julia REPL, you should see (your-project-name) pkg\\> instead of julia\\>. Again, exit the package manager using `backspace/delete` button.\n\n### Working with the package manager and growing the project and manifest files\n\nOnce your project is activated, there are two ways to use the package manager (Pkg):\n\n1. directly from the REPL:\n\n- navigate to the REPL\n- type `]`\n- you will see that instead of seeing julia\\> you now see (your-project-name) pkg\\>, indicating that all the packages that you now install (or update) will be installed (or updated) within this specific project\n- to add a package, use the function `add`: `] add Plots`\n\n2. using `Pkg` (this is useful when you want to install packages or manage them from within your script):\n\n- first type `import Pkg` and execute this line using shift-Enter\n- on subsequent lines, add, remove and update packages from your script using `Pkg` functions such as `Pkg.add()`, `Pkg.remove()` or `Pkg.update()`.\n- To add a packages, the name of the package need to be written with quotes (`Pkg.add(\"Plots\")`).\n\n#### An example using the Plots package\n\nNow that we are all set up, we are going to install a package, check the project's status and remove a package. As this might be your first time installing a package (e.g., Plots), don't be concerned if it takes a couple of minutes to run.\n\n- type `] add Plots` in the REPL (or `Pkg.add(\"Plots\")`) in your script and execute using Ctrl-Enter.\n - you just installed the Plots package and a whole bunch of dependencies that Plots needs to work. This is equivalent to Base plots in R.\n\n\n\n- type `] st` in the REPL. This will check the status of your project and print the content of your Project.toml file, which is the list of main packages, in this case, just Plots.\n\nyou should see something like:\n\n\n\n::: {.callout-tip}\n## Tip\n\nPackages can removed in the same way i.e. `] rm Plots` (or `Pkg.rm(\"Plots\")`) will remove the Plots package from your project environment (and its record in the Project.toml and Manifest.toml files)\n::: \n\n## Gearing up to Do More Stuff (what packages do I need).\n\nThere are a core set of packages we use for all of our work. These 10 packages are almost always installed when we make a project.\n\nGo ahead and use either the `]` or `Pkg.add(\"package.name\")` method to add all of these to your project.\n\n#### For working with data\n\n`CSV` `DataFrames` `DelimitedFiles`\n\n#### For plotting\n\n`Plots`\n\n#### For statistical things\n\n`Distributions` `Random` `Statistics` `StatsBase` `StatsPlots`\n\n#### For Modelling\n\n`DifferentialEquations`\n\n## Your first script setup.\n\nAt this stage, you should have a good understanding about how to create a project folder, activate a project, start the REPL, open a script and add packages to the project.\n\nNow you are ready to 'setup' your first script.\n\n1. create a new script file (ctrl-n or cmd-n).\n2. choose Julia as the language\n3. Type some informative information at the top of the script\n a. just like in R and other programming languages, the `#` is a commenter.\n4. The first section of your script is where you declare the packages you'll be using.\n a. the function to do this is `using`.\n b. make Plots, Random and DataFrames available.\n\nNow you are ready to do something really simple. Let's make some variables, data frames and a few simple plots.\n\nFirst, lets get the setup sorted and packages available\n\n\n\n\n::: {#4 .cell execution_count=1}\n``` {.julia .cell-code}\n# This is my first example script\n# 25 Jan 2023\n\n# packages I need\nusing DataFrames, Plots, Random, StatsPlots\n```\n:::\n\n\n\n\n\n\nSecond, let's make some variables and see how Julia prints them to the screen\n\n\n\n\n::: {#6 .cell execution_count=1}\n``` {.julia .cell-code}\n# make two variables using the rand function\n# because we are using random numbers, we'll set the seed here for reproducibility\n\nRandom.seed!(12345)\n\nx = rand(10)\ny = rand(10)\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```\n10-element Vector{Float64}:\n 0.3302627700323072\n 0.4219866389257305\n 0.6853069230253171\n 0.29579983859112813\n 0.9736588395655787\n 0.24458973555203245\n 0.46875054050900267\n 0.27705458732580956\n 0.6299157011197652\n 0.12180466275080659\n```\n:::\n:::\n\n\n\n\n\n\nCool. Now, lets create two data frames, one made of the x and y variables, and another with three variables made directly in a call to `DataFrame`.\n\n\n\n\n::: {#8 .cell execution_count=1}\n``` {.julia .cell-code}\n# combine into a data frame using the DataFrame function\ndf = DataFrame(x = x, y = y)\ndf\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```{=html}\n
10×2 DataFrame
Row
x
y
Float64
Float64
1
0.791805
0.330263
2
0.159579
0.421987
3
0.334191
0.685307
4
0.811392
0.2958
5
0.796629
0.973659
6
0.917814
0.24459
7
0.311327
0.468751
8
0.752906
0.277055
9
0.633848
0.629916
10
0.899951
0.121805
\n```\n:::\n:::\n\n\n\n\n\n\n...and the second\n\n\n\n\n::: {#10 .cell execution_count=1}\n``` {.julia .cell-code}\n# make a second data frame with three variables\n# using DataFrame directly to create variables\ndf2 = DataFrame(a=1:10, b=10*rand(10), c=10*rand(10))\ndf2\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```{=html}\n
10×3 DataFrame
Row
a
b
c
Int64
Float64
Float64
1
1
0.563403
9.77384
2
2
7.22679
3.58869
3
3
0.466642
3.76688
4
4
4.59489
9.03599
5
5
0.491108
8.73964
6
6
6.99192
1.36299
7
7
1.58122
0.815793
8
8
4.70745
3.75399
9
9
4.97572
0.599761
10
10
4.58675
2.14792
\n```\n:::\n:::\n\n\n\n\n\n\nGreat. Now, lets see how to plot the 'solo' variables. Note how we specify the `seriestype`. Try getting rid of this....\n\n\n\n\n::: {#12 .cell execution_count=1}\n``` {.julia .cell-code}\n# plot the data using x and y, as a scatterplot\nplot(x, y, seriestype=:scatter)\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```{=html}\n\n\n```\n:::\n:::\n\n\n\n\n\n\nSuperb. So, `StatsPlots` provides a special macro to use a dataframe with plots. It's a three step process:\n\n1. declare the `@df` macro\n2. define the data frame\n3. declare the columns, using the `:`\n\n\n\n\n::: {#14 .cell execution_count=1}\n``` {.julia .cell-code}\n# plot the data using the data frame macro\n# declare the df macro, declare the data frame, use : to signify columns\n@df df plot(:x, :y)\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```{=html}\n\n\n```\n:::\n:::\n\n\n\n\n\n\nAnd here, we use the df2, and plot variable b and c vs. a.\n\n\n\n\n::: {#16 .cell execution_count=1}\n``` {.julia .cell-code}\n# the same, and plotting two y variables\n@df df2 plot(:a, [:b, :c])\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```{=html}\n\n\n```\n:::\n:::\n\n\n\n\n\n\n#### A quick briefing about data frames in Julia versus R and dplyr is here\n\n[DataFrames Comparison R dplyr](https://dataframes.juliadata.org/stable/man/comparisons/#Comparison-with-the-R-package-dplyr)\n\n",
"supporting": [
"1_download_setup_files/figure-html"
],