2021-10-13 19:37:21 +00:00
---
title: "Connect Project"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
2021-10-27 12:01:46 +00:00
# Load RColorBrewer
# install.packages("RColorBrewer")
library(RColorBrewer)
# Define colour palettes for plots below
2021-10-27 12:22:49 +00:00
coul3 <- brewer.pal(3, "RdYlBu") # Using RdYlBu range to generate 3 colour palette: https://colorbrewer2.org/#type=diverging&scheme=RdYlBu&n=5
2021-10-27 12:01:46 +00:00
2021-10-13 19:37:21 +00:00
```
Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.
### To Do List
2021-10-20 18:34:54 +00:00
## Upload Data
```{r Data Upload}
2021-10-27 11:52:31 +00:00
connect_data = read.csv("./data/connectDATA.csv")
2021-10-20 18:34:54 +00:00
```
2021-10-13 19:37:21 +00:00
## Summary of Data
Data summary/visualisation with subsetting:
- RH: display simple summary of data (bar/pie chart) to Q25/26, Q3
2021-10-20 18:34:54 +00:00
```{r Frequencies}
#Frequencies#
2021-10-13 19:37:21 +00:00
2021-10-20 18:34:54 +00:00
Q25_frequencies = table(connect_data$Q25)
Q25_frequencies
Q26_freq = table(connect_data$Q26)
Q26_freq
Q3_freq = table(connect_data$Q3)
Q3_freq
#test3 = as.factor(connect_data$Q3, levels = c(1, 2, 3, 4, 5), labels = c("Worldviews", "Religion", "Theology", "Ethics", "Philosophy"))
```
2021-10-13 19:37:21 +00:00
```{r Q25 bar/pie}
2021-10-27 12:22:49 +00:00
pie(Q25_frequencies, labels = c("Maybe", "No", "Yes"), col = coul3)
2021-10-20 18:34:54 +00:00
2021-10-13 19:37:21 +00:00
```
```{r Q26 bar/pie}
2021-10-25 15:13:22 +00:00
2021-10-27 11:52:31 +00:00
Q26_data <- read.csv("./data/Q26_data.csv")
2021-10-25 15:13:22 +00:00
Q26_freq_data <- data.frame(c("Other Priorities", "Lack Subject Knowledge", "Lack Confidence", "Current Syllabus", "Pupil Disinterest", "Department Head", "Available Work Schemes", "Unavailable Resources", "Uncertain of Pedagogical Approach"), c(table(Q26_data[,2]) [names(table(Q26_data[,2])) == "TRUE"],
table(Q26_data[,3]) [names(table(Q26_data[,3])) == "TRUE"],
table(Q26_data[,4]) [names(table(Q26_data[,4])) == "TRUE"],
table(Q26_data[,5]) [names(table(Q26_data[,5])) == "TRUE"],
table(Q26_data[,6]) [names(table(Q26_data[,6])) == "TRUE"],
table(Q26_data[,7]) [names(table(Q26_data[,7])) == "TRUE"],
table(Q26_data[,8]) [names(table(Q26_data[,8])) == "TRUE"],
table(Q26_data[,9]) [names(table(Q26_data[,9])) == "TRUE"],
table(Q26_data[,10]) [names(table(Q26_data[,10])) == "TRUE"]))
head(Q26_freq_data)
names(Q26_freq_data)[1] <- "Reasons"
names(Q26_freq_data)[2] <- "Frequency"
head(Q26_freq_data)
pie(Q26_freq_data$Frequency, labels = c("Other Priorities", "Lack Subject Knowledge", "Lack Confidence", "Current Syllabus", "Pupil Disinterest", "Department Head", "Available Work Schemes", "Unavailable Resources", "Uncertain of Pedagogical Approach"))
2021-10-27 12:29:43 +00:00
# Bar graph tidier
2021-10-13 19:37:21 +00:00
```
2021-10-20 18:34:54 +00:00
pie(Q26_freq)
#very messy as a pie chart - split by type? Or is it important to see crossover
2021-10-27 12:29:43 +00:00
Could potentially see crossover with crosstabs by type (since response is now binary variable T/F), maybe chi square; perhaps just descriptives
2021-10-20 18:34:54 +00:00
2021-10-13 19:37:21 +00:00
```{r Q3 bar/pie}
2021-10-22 13:24:57 +00:00
2021-10-27 11:52:31 +00:00
Q3_data <- read.csv("./data/Q3.csv")
2021-10-25 15:13:22 +00:00
#head(Q3_data)
#table(Q3_data [,3:7])
#pie(table(Q3_data [,3:7]))
Q3_data2 <- Q3_data[,3:7]
#head(Q3_data2)
#table(Q3_data2)
#table(Q3_data2[,1])
### want to take only the count of "True" (1) in each column. Then pie chart of the frequencies
#Q3_data3 <- read.csv("~/Documents/Github/re_connect_survey/data/Q3 copydata.csv")
#table(Q3_data3)
#count(Q3_data3, 1)
#table(Q3_data3) [names(table(Q3_data3)) == 1]
#table(Q3_data3)
table(Q3_data2[,1]) [names(table(Q3_data2[,1])) == "TRUE"]
test2 <- data.frame(c("Worldviews", "Religion", "Theology", "Ethics", "Philosophy"), c(table(Q3_data2[,1]) [names(table(Q3_data2[,1])) == "TRUE"],
table(Q3_data2[,2]) [names(table(Q3_data2[,2])) == "TRUE"],
table(Q3_data2[,3]) [names(table(Q3_data2[,3])) == "TRUE"],
table(Q3_data2[,4]) [names(table(Q3_data2[,4])) == "TRUE"],
table(Q3_data2[,5]) [names(table(Q3_data2[,5])) == "TRUE"]))
head(test2)
names(test2)[1] <- "Subject"
names(test2)[2] <- "Frequency"
head(test2)
pie(test2$Frequency, labels = c("Worldviews", "Religion", "Theology", "Ethics", "Philosophy"))
2021-10-27 12:22:58 +00:00
# JK note on Q3: consider here whether to use alternative forms of visualiation to reflect the overlaps when respondents picked multiple categories in responses
2021-10-22 13:24:57 +00:00
2021-10-27 12:22:58 +00:00
```
2021-10-13 19:37:21 +00:00
2021-10-22 13:24:57 +00:00
2021-10-20 18:34:54 +00:00
pie(Q3_freq)
#also not optimal as pie...perhaps bar
2021-10-25 15:13:22 +00:00
#sum(Q3_data2)
Q3_1factor = as.factor(Q3_data2$Religion)
table(Q3_1factor)
#count(Q3_1factor, "TRUE")
2021-10-20 18:34:54 +00:00
2021-10-25 15:13:22 +00:00
#test = replace(Q3_1factor, "TRUE", 1)
#test
#Q3_1factor
2021-10-20 18:34:54 +00:00
2021-10-13 19:37:21 +00:00
- RH: display summaries of responses to key questions for Q22 (syllabus evaluation), Q23, Q24, Q25, Q26, Q27, with subsetting by:
- Q8 (school type)
- Q9 (school size)
- Q10 (school location)
- Q1 (grade level) + Q35 (teaching role) + +Q5 (teaching proportion) Q2 (tenure) + and Q3 (subjects taught), + Q6/Q7 (management)
- Q12-14 (school's official religion) / Q15-16 (school's informal religion)
- Q21 (respondent personal religious background)
- Q4 (teacher's degree subject)
- Q18 (respondent gender)
- Q19 (respondent ethnic self-desc)
```{r Plots}
# Q22
# Q23
# Q24
# Q25
# Q26
# Q27
```
2021-10-20 18:34:54 +00:00
## Correlation testing:
- RH: test for correlation between "social issue" box ticked on Q20 and responses to Q22, Q23, Q27
- Make Q20 a factor with 14 levels
- Collapse 2 Q22 columns into one mean for analyses
- Analyse 1 way anova Q20 (14 levels) by Q22; Q23[1-2]; Q27[1-7]
```{r Correlation 1}
```
2021-10-25 15:13:22 +00:00
- RH: test for correlation between responses to religion questions: Q12-14, Q15-16 and Q21 and responses to Q22, Q23, Q27, [Q24, Q25, Q30]