-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.qmd
195 lines (120 loc) · 8.26 KB
/
index.qmd
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# Preface {.unnumbered}
```{r fa-setup, include=F}
library(fontawesome)
fa_html_dependency()
```
## Content Overload!
This book is designed to demonstrate introductory statistical programming concepts and techniques. It is intended as a substitute for hours and hours of video lectures - watching someone code and talk about code is not usually the best way to learn how to code. It's far better to learn how to code by ... coding.
I hope that you will work through this book week by week over the semester.
I have included comics, snark, gifs, YouTube videos, extra resources, and more: my goal is to make this a collection of the best information I can find on statistical programming.
In most cases, this book includes **way more information** than you need. Everyone comes into this class with a different level of computing experience, so I've attempted to make this book comprehensive.
Unfortunately, that means some people will be bored and some will be overwhelmed.
Use this book in the way that works best for you - skip over the stuff you know already, ignore the stuff that seems too complex until you understand the basics. Come back to the scary stuff later and see if it makes more sense to you.
## Book Format Guide
I've made an effort to use some specific formatting and enable certain features that make this book a useful tool for this class.
### Buttons/Links {.unnumbered}
The book contains a number of features which should help you navigate, use, improve, and respond to the textbook.
![Textbook features, menus, and interactive options](images/how-to-use/Textbook-features.png){fig-alt="There are a number of interactive features available in this textbook. There is a search bar on the left sidebar, along with links to each chapter. On the right, there is a menu specific to the sections in each chapter - this helps you navigate within the chapter. There is also a link to \"Edit this page\" that allows you to submit a correction to the textbook via Github. If you log in via GitHub, you can also leave comments, start discussions, or ask questions using the github discussion integration at the bottom of the page. At the bottom, there is a link to the next chapter, but there are also reaction emoji that allow you to express yourself after you read the chapter."}
### Special Sections {.unnumbered}
Some instructions depend on your operating system. Where it's shorter, I will use tabs to provide you with OS specific instructions. Here are the icons I will use:
::: panel-tabset
#### {{< fa brands windows >}} Windows
Windows-specific instructions
#### {{< fa brands apple >}} Mac
Mac specific instructions
#### {{< fa brands linux >}} Linux
Linux specific instructions. I will usually try to make this generic, but if it's gui based, my instructions will usually be for KDE.
:::
::: callout-important
#### Warnings {.unnumbered}
These sections contain things you may want to look out for: common errors, mistakes, and unfortunate situations that may arise when programming.
:::
::: callout-demo
#### Demonstrations {.unnumbered}
These sections demonstrate how the code being discussed is used (in a simple way).
:::
::: callout-caution
#### Examples {.unnumbered}
These sections contain illustrations of the concepts discussed in the chapter.
Don't skip them, even though they may be long!
:::
::: callout-tip
#### Try it out {.unnumbered}
These sections contain activities you should do to reinforce the things you've just read.
You will be much more successful if you read the material, review the example, and then try to write your own code.
Most of the time, these sections will have a specific format:
::: panel-tabset
##### Problem {.unnumbered}
The problem will be in the first tab for you to start with
##### R Solution {.unnumbered}
A solution will be provided in R, potentially with an explanation.
##### Python Solution {.unnumbered}
A solution will be provided in Python as well.
:::
In some cases, the problem will be more open-ended and may not adhere to this format, but most try it out sections in this book will have solutions provided.
I **highly** recommend that you attempt to solve the problem yourself before you look at the solutions - this is the best way to learn.
Passively reading code does not result in information retention.
:::
::: callout-important
#### Essential Reading {.unnumbered}
These sections may direct you to additional reading material that is essential for understanding the topic. For instance, I will sometimes link to other online textbooks rather than try to rehash the content myself when someone else has done it better.
:::
::: callout-learnmore
#### Learn More {.unnumbered}
These sections will direct you to additional resources that may be helpful to consult as you learn about a topic.
You do not have to use these sections unless you are 1) bored, or 2) hopelessly lost.
They're provided to help but are not expected reading (Unlike the essential reading sections in red).
:::
::: callout-note
#### Notes {.unnumbered}
These generic sections contain information I may want to call attention to, but that isn't necessarily urgent or a common error trap.
:::
::: callout-advanced
#### Advanced
These sections are intended to apply to more advanced courses.
If you are taking an introductory course, feel free to skip that content for now.
:::
#### Expandable Sections {.unnumbered}
<details>
<summary>
These are expandable sections, with additional information when you click on the line
</summary>
This additional information may be information that is helpful but not essential, or it may be that an example just takes a LOT of space and I want to make sure you can skim the book without having to scroll through a ton of output.
</details>
::: {.callout-note collapse="true"}
#### Another type of expandable note
Answers or punchlines may be hidden in this type of expandable section as well.
:::
## Analytics
I have enabled Google Analytics on this site for the purposes of measuring this work's impact and use both in my own classes and elsewhere.
I'm not using the individual tracking/ad-targeting settings (to the best of my knowledge) - my only purpose in using Google Analytics is to assess how often this site is used, and where its' users are located at a rough (state/regional) level.
If you are using this site and aren't affiliated with the University of Nebraska Lincoln, or have found it useful, please let me know by making a comment in Giscus (below) or sending me an email! These affirmations help me make a case that spending time on this resource is actually a good investment.
## Acknowledgements
The cover of this book is an amalgam of different images by the lovely [\@allison_horst](https://github.com/allisonhorst), which are released under the [cc-by 4.0 license](https://github.com/allisonhorst/stats-illustrations/blob/main/license). I have modified them to remove most of the R package references and arrange them to represent the topics covered in this book.
<a href="https://www.flaticon.com/free-icons/laptop">Laptop icon used in the tab/logo created by Good Ware - Flaticon</a>
Throughout this book, I have borrowed liberally from other online tutorials, published books, and blog posts. I have tried to ensure that I link to the source material throughout the book and provide appropriate credit to anyone whose examples I have used, modified, or repurposed. Special thanks to the tutorials provided by Posit/RStudio and the tidyverse project.
I don't have official editors, but thank you to those who make use of the giscus comment box to let me know about issues and typos. So far, you've helped me fix at least `r 3` issues so far!
::: {.callout-note collapse=true}
## Tools
This book was built with the following parameters/settings/library versions:
```{python}
#| eval: true
#| echo: true
#| cache: false
import os
import sys
itemlist = ["PWD", "SHELL", "USER", "PYTHONIOENCODING", "VIRTUAL_ENV", "RETICULATE_PYTHON", "R_HOME", "R_PLATFORM", "LD_LIBRARY_PATH", "R_LIBS_USER", "R_LIBS_SITE","RENV_PROJECT", "RSTUDIO_PANDOC", "RMARKDOWN_MATHJAX_PATH", "R_SESSION_INITIALIZED", "PYTHONPATH"]
itemlist = list(set(itemlist) & set(os.environ))
itemlist.sort()
for item in itemlist:
print(f'{item}{" : "}{os.environ[item]}')
print(sys.path)
```
```{R}
#| eval: true
#| echo: true
#| cache: false
library(devtools)
devtools::session_info()
```
:::