-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchecklist.qmd
More file actions
122 lines (90 loc) · 4.68 KB
/
checklist.qmd
File metadata and controls
122 lines (90 loc) · 4.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
---
title: "Pre-workshop checklist"
format: html
---
Here are the main steps needed to set up your environment so that you're ready to use {asar} and {stockplotr} to create a stock assessment report.
If you have any questions, please contact the [workshop organizers](https://nmfs-ost.github.io/workflows-workshop/#the-organizers).
# Coding environment = your local machine
1. Ensure that you can run [R code](https://www.r-project.org/) with a platform like RStudio, VS Code, Positron, etc.
2. Ensure you have downloaded [Quarto, version 1.6+ ](https://quarto.org/docs/get-started/) and can create Quarto documents.
```{r eval=FALSE}
quarto::quarto_version()
```
3. [Create a new Github repo](https://happygitwithr.com/rstudio-git-github.html#make-a-repo-on-github-1) for the workshop.
4. [Clone your repo and set up an RStudio Project](https://happygitwithr.com/rstudio-git-github.html#clone-the-test-github-repository-to-your-computer-via-rstudio).
5. Run the following code to get two essential files from the workflows-workshop github repo:
1. Input data file "Report.sso" will save to a "example_output" folder in your home directory
2. Example plot file "landings_fig_png.png" will save to a "example_plots" folder in your home directory
```{r eval=FALSE, message=FALSE}
# Function to obtain files used during workshop
get_workshop_files <- function(dest_folder,
dest_file,
url){
if (!file.exists(dest_folder)) {
dir.create(dest_folder)
}
if (!file.exists(dest_file)) {
cli::cli_alert_info("📥 Downloading {dest_file}...")
download.file(url, dest_file, mode = "wb")
message("✅ Download complete.")
} else {
cli::cli_alert_info("✅ File already exists: {dest_file}")
}
}
# Obtain example output file
get_workshop_files(
dest_folder = file.path("example_output"),
dest_file = file.path("example_output", "Report.sso"),
url = "https://raw.githubusercontent.com/nmfs-ost/workflows-workshop/main/example_output/Report.sso"
)
# Obtain example figure file
get_workshop_files(
dest_folder = file.path("example_plots"),
dest_file = file.path("example_plots", "landings_fig_png.png"),
url = "https://raw.githubusercontent.com/nmfs-ost/workflows-workshop/main/example_plots/landings_fig_png.png"
)
```
6. Install important R packages
<!-- ::: {.callout-tip} -->
<!-- ## Tip -->
<!-- The following packages are already installed in the {asar} workspace on JupyterHub, so if you are using that space, you can skip this section. -->
<!-- ::: -->
We recommend using the [{pak} R package](https://pak.r-lib.org/) to install R packages where possible, since it avoids re-downloading files if they're already present.
```r
install.packages("pak")
```
* {asar}
```r
pak::pak("nmfs-ost/asar")
```
Please see the [{asar} README](https://github.com/nmfs-ost/asar) for more installation options.
* {stockplotr}
```r
pak::pak("nmfs-ost/stockplotr")
```
Please see the [stockplotr README](https://github.com/nmfs-ost/stockplotr) for more installation options.
* {tinytex}
We recommend installing the full {tinytex} bundle to ensure that all LaTeX packages will be present when you need them. **This will take ~30 minutes to complete.**
```r
pak::pkg_install("rstudio/tinytex")
tinytex::install_tinytex(bundle = "TinyTeX-2")
```
::: callout-tip
To test your `TinyTeX` setup, you can save the following code in a Quarto file ("test.qmd") and hit Render. If it renders, that's a good sign! If you get an error, you may have an issue with your `TinyTeX` installation:
````
---
title: "TinyTeX Test"
format: pdf
---
Sample text to test if your Quarto file rendered into a PDF.
````
:::
7. Explore {asar} and {stockplotr} websites
Browse the [{asar}](https://nmfs-ost.github.io/asar/) and [{stockplotr}](https://nmfs-ost.github.io/stockplotr/) websites- especially the cheatsheets and articles.
<!-- # Coding environment = the cloud (Jupyterhub) -->
<!-- ::: {.callout-important} -->
<!-- Currently, this option is **only available for NSAW workshop participants.** -->
<!-- ::: -->
<!-- While we strongly encourage everyone to set up their coding environment on their local machines, we recognize that some may prefer to use a **temporary**, cloud-based environment for this workshop. You must export any files you wish to keep on the same day of the workshop or else they will be erased. -->
<!-- You can access a JupyterHub workshop server for this purpose. Before the workshop begins, please familiarize yourself with the [setup instructions on the NSAW workshop page](https://nmfs-ost.github.io/workflows-workshop/Curriculum/nsaw.html#materials-for-todays-lesson) and contact us for the password. -->
<!-- Then, follow steps 3, 4, 5, and 7 in the section above. -->