forked from UVADS/DS-3001
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpre_class_survey_results.Rmd
86 lines (51 loc) · 1.55 KB
/
pre_class_survey_results.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
---
title: "Survey Results"
author: "Brian Wright"
date: "8/25/2021"
output:
html_document:
toc: yes
toc_float:
toc_collapsed: true
editor_options:
chunk_output_type: console
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```
```{r,include=FALSE}
library(tidyverse)
```
```{r, include=FALSE}
data <- read_csv("~/git_3001/DS-3001/pre_class_survey_data.csv")
#View(data)
```
## Let's take a look at the numeric responses
```{r}
str(data)
column_index <- tibble(colnames(data))
column_index
hist(data$`On a scale of 1 to 10 rank your comfort with the R programming language, generally`, main = "R Programming")
hist(data$`On a scale from 1 to 10 rank your comfort with markdown or Rmarkdown generally.`, main = "Markdown")
hist(data$`On scale from 1 to 10 rank your comfort with using tidyverse packages`, main = "Tidyverse")
hist(data$`On a scale from 1 to 10 rank your experience using machine learning models.`, main = "Machine Learning")
```
## Now let's check out the factors(what's a better appoarch)
```{r}
x_table <- table(data$`What is your major?`)
vis <- ggplot(data, aes(y=`What is your major?`))#flipped the cartesian coordinates for better viewing
column_index
data[[8]]
factor_viz <- function(x,y,z){
vis <- ggplot(x, aes(y=x[[y]]))+
geom_bar()+
labs(x="Count",y=z)+
theme_minimal()
vis
}
#What would the function look like for major and language
factor_viz(data,8,"Major")
factor_viz(data,9,"Language")
factor_viz(data,10,"Data Scientist?")
factor_viz(data,13,"Pizza Pineapple?")
```