generated from course-files/BBT4206-Lab1of15-LoadingDatasets-R
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Lab-Submission-Markdown.Rmd
271 lines (241 loc) · 17 KB
/
Lab-Submission-Markdown.Rmd
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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
---
title: "Business Intelligence Lab Submission Markdown"
author: "<Specify your group name here>"
date: "<Specify the date when you submitted the lab>"
output:
github_document:
toc: yes
toc_depth: 4
fig_width: 6
fig_height: 4
df_print: default
editor_options:
chunk_output_type: console
---
# Student Details
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| **Student ID Numbers and Names of Group Members** | *\<list one student name, class group (just the letter; A, B, or C), and ID per line, e.g., 123456 - A - John Leposo; you should be between 2 and 5 members per group\>* |
| | |
| | 1. ID - Class Group - Name |
| | |
| | 2. ID - Class Group - Name |
| | |
| | 3. ID - Class Group - Name |
| | |
| | 4. ID - Class Group - Name |
| | |
| | 5. ID - Class Group - Name |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| **GitHub Classroom Group Name** | *\<specify the name of the team you created on GitHub classroom\>* |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| **Course Code** | BBT4206 |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| **Course Name** | Business Intelligence II |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| **Program** | Bachelor of Business Information Technology |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| **Semester Duration** | 21^st^ August 2023 to 28^th^ November 2023 |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
# Setup Chunk
We start by installing all the required packages
```{r Install Packages, echo=TRUE, message=FALSE, warning=FALSE}
## formatR - Required to format R code in the markdown ----
if (!is.element("formatR", installed.packages()[, 1])) {
install.packages("formatR", dependencies = TRUE,
repos="https://cloud.r-project.org")
}
require("formatR")
## readr - Load datasets from CSV files ----
if (!is.element("readr", installed.packages()[, 1])) {
install.packages("readr", dependencies = TRUE,
repos="https://cloud.r-project.org")
}
require("readr")
```
------------------------------------------------------------------------
**Note:** the following "*KnitR*" options have been set as the defaults in this markdown:\
`knitr::opts_chunk$set(echo = TRUE, warning = FALSE, eval = TRUE, collapse = FALSE, tidy.opts = list(width.cutoff = 80), tidy = TRUE)`.
More KnitR options are documented here <https://bookdown.org/yihui/rmarkdown-cookbook/chunk-options.html> and here <https://yihui.org/knitr/options/>.
```{r setup, echo=TRUE, message=FALSE, warning=FALSE}
knitr::opts_chunk$set(
eval = TRUE,
echo = TRUE,
warning = FALSE,
collapse = FALSE,
tidy = TRUE
)
```
------------------------------------------------------------------------
**Note:** the following "*R Markdown*" options have been set as the defaults in this markdown:
> output:\
> \
> github_document:\
> toc: yes\
> toc_depth: 4\
> fig_width: 6\
> fig_height: 4\
> df_print: default\
> \
> editor_options:\
> chunk_output_type: console
# Loading the Student Performance Dataset
The 20230412-20230719-BI1-BBIT4-1-StudentPerformanceDataset is then loaded. The dataset and its metadata are available here: <https://drive.google.com/drive/folders/1-BGEhfOwquXF6KKXwcvrx7WuZXuqmW9q?usp=sharing>
```{r Load Dataset}
student_performance_dataset <-
readr::read_csv(
"../data/20230412-20230719-BI1-BBIT4-1-StudentPerformanceDataset.CSV", # nolint
col_types =
readr::cols(
class_group =
readr::col_factor(levels = c("A", "B", "C")),
gender = readr::col_factor(levels = c("1", "0")),
YOB = readr::col_date(format = "%Y"),
regret_choosing_bi =
readr::col_factor(levels = c("1", "0")),
drop_bi_now =
readr::col_factor(levels = c("1", "0")),
motivator =
readr::col_factor(levels = c("1", "0")),
read_content_before_lecture =
readr::col_factor(levels =
c("1", "2", "3", "4", "5")),
anticipate_test_questions =
readr::col_factor(levels =
c("1", "2", "3", "4", "5")),
answer_rhetorical_questions =
readr::col_factor(levels =
c("1", "2", "3", "4", "5")),
find_terms_I_do_not_know =
readr::col_factor(levels =
c("1", "2", "3", "4", "5")),
copy_new_terms_in_reading_notebook =
readr::col_factor(levels =
c("1", "2", "3", "4", "5")),
take_quizzes_and_use_results =
readr::col_factor(levels =
c("1", "2", "3", "4", "5")),
reorganise_course_outline =
readr::col_factor(levels =
c("1", "2", "3", "4", "5")),
write_down_important_points =
readr::col_factor(levels =
c("1", "2", "3", "4", "5")),
space_out_revision =
readr::col_factor(levels =
c("1", "2", "3", "4", "5")),
studying_in_study_group =
readr::col_factor(levels =
c("1", "2", "3", "4", "5")),
schedule_appointments =
readr::col_factor(levels =
c("1", "2", "3", "4", "5")),
goal_oriented =
readr::col_factor(levels =
c("1", "0")),
spaced_repetition =
readr::col_factor(levels =
c("1", "2", "3", "4")),
testing_and_active_recall =
readr::col_factor(levels =
c("1", "2", "3", "4")),
interleaving =
readr::col_factor(levels =
c("1", "2", "3", "4")),
categorizing =
readr::col_factor(levels =
c("1", "2", "3", "4")),
retrospective_timetable =
readr::col_factor(levels =
c("1", "2", "3", "4")),
cornell_notes =
readr::col_factor(levels =
c("1", "2", "3", "4")),
sq3r = readr::col_factor(levels =
c("1", "2", "3", "4")),
commute = readr::col_factor(levels =
c("1", "2",
"3", "4")),
study_time = readr::col_factor(levels =
c("1", "2",
"3", "4")),
repeats_since_Y1 = readr::col_integer(),
paid_tuition = readr::col_factor(levels =
c("0", "1")),
free_tuition = readr::col_factor(levels =
c("0", "1")),
extra_curricular = readr::col_factor(levels =
c("0", "1")),
sports_extra_curricular =
readr::col_factor(levels = c("0", "1")),
exercise_per_week = readr::col_factor(levels =
c("0", "1",
"2",
"3")),
meditate = readr::col_factor(levels =
c("0", "1",
"2", "3")),
pray = readr::col_factor(levels =
c("0", "1",
"2", "3")),
internet = readr::col_factor(levels =
c("0", "1")),
laptop = readr::col_factor(levels = c("0", "1")),
family_relationships =
readr::col_factor(levels =
c("1", "2", "3", "4", "5")),
friendships = readr::col_factor(levels =
c("1", "2", "3",
"4", "5")),
romantic_relationships =
readr::col_factor(levels =
c("0", "1", "2", "3", "4")),
spiritual_wellnes =
readr::col_factor(levels = c("1", "2", "3",
"4", "5")),
financial_wellness =
readr::col_factor(levels = c("1", "2", "3",
"4", "5")),
health = readr::col_factor(levels = c("1", "2",
"3", "4",
"5")),
day_out = readr::col_factor(levels = c("0", "1",
"2", "3")),
night_out = readr::col_factor(levels = c("0",
"1", "2",
"3")),
alcohol_or_narcotics =
readr::col_factor(levels = c("0", "1", "2", "3")),
mentor = readr::col_factor(levels = c("0", "1")),
mentor_meetings = readr::col_factor(levels =
c("0", "1",
"2", "3")),
`Attendance Waiver Granted: 1 = Yes, 0 = No` =
readr::col_factor(levels = c("0", "1")),
GRADE = readr::col_factor(levels =
c("A", "B", "C", "D",
"E"))),
locale = readr::locale())
```
## Description of the Dataset
We then display the number of observations and number of variables. We have 101 observations and 100 variables to work with.
```{r Your Fourth Code Chunk}
dim(student_performance_dataset)
```
Next, we display the quartiles for each numeric variable[*... think of this process as **"storytelling using the data."** Tell us what is happening; tell us what you are discovering as you proceed with the markdown; walk us through your code step-by-step (a code walkthrough).*]{#highlight style="color: blue"}
```{r Your Fifth Code Chunk}
summary(student_performance_dataset)
```
# \<You can Provide Another Appropriate Title Here if you wish\>
Describe the code chunk here:
```{r Your Sixth Code Chunk}
# Fill this with R related code that will be executed when the R markdown file
```
## \<You Can Have a Sub-Title Here if you wish\>
```{r Your Seventh Code Chunk}
# Fill this with other R related code that will be executed when the R markdown
```
## \<You Can Have Another Sub-Title Here if you wish\>
```{r Your Eighth Code Chunk}
# Fill this with other R related code that will be executed when the R markdown
```
**etc.** as per the lab submission requirements. Be neat and communicate in a clear and logical manner.