-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathindex.qmd
More file actions
209 lines (124 loc) · 8.77 KB
/
index.qmd
File metadata and controls
209 lines (124 loc) · 8.77 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
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# Preface {.unnumbered}
```{r}
#| label: fa-setup
#| include: !expr F
library(fontawesome)
fa_html_dependency()
```
## Content Overload!
This book is designed to explain and demonstrate statistical programming concepts and techniques.
I started this project in Summer 2020 as a less-tedious way to learn programming compared to hours and hours of video lectures.
I've always found that 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, but it's hard to start from nothing, too.
Because this book was begun as an alternative to recorded lectures with slides, I have included all of the comics, snark, and gifs that I would normally have put in lecture slides.
I've also supplemented this with other things that you can't usually put in slide presentations: YouTube videos, extra resources, links to other textbooks that are more specific than this one.
My goal is to make this a collection of the best information I can find on data science and statistical programming.
---
There is a downside to this approach: in most cases, this book includes **way more information** than you need.
Everyone starts with a different level of computing experience, so I've attempted to make this book comprehensive.
Unfortunately, that means some sections will seem like they are stating the obvious, and some sections will have more detail than you *ever* wanted to know.
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.
::: {.column-margin role="dialog"}
{.lightbox 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."}
:::
::: {.setup role="dialog"}
#### Setup {.unnumbered}
These sections contain instructions for installing and configuring things. They may be collapsed by default, but that doesn't make them any less important -- it's just useful to condense them after you've completed the setup so that you can focus on more important things.
:::
### Operating System Instructions {.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 role="button"}
#### {{< 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-caution role="dialog"}
#### Warnings {-}
These sections contain things you may want to look out for: common errors, mistakes, and unfortunate situations that may arise when programming.
:::
::: {.demo role="dialog"}
#### Demos {-}
These sections contain basic demonstrations of how functions or concepts work. They are slightly less interactive than examples.
:::
::: {.example role="dialog"}
#### Examples {-}
Examples are intended to be interactive - you should attempt them before looking at the code solutions. Often, examples will have tabs which provide the problem, a sketch (sometimes), and then solutions in R and python.
:::: {.panel-tabset role="button"}
##### Problem {-}
The problem will be in the first tab for you to start with
##### R Solution {-}
A solution will be provided in R, potentially with an explanation.
##### Python Solution {-}
A solution will be provided in Python as well, with an explanation of that code.
::::
:::
In some cases, the problem will be more open-ended and may not adhere to this format, but most example 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.
::: {.learnmore role="dialog"}
#### Learn More {-}
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. -->
<!-- ::: -->
::: {.advanced role="dialog"}
#### 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 {-}
<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" role="dialog"}
#### 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 role="dialog"}
## 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()
```
:::