From 3dbc16246a01b5c58a7bfa5c07ad666e6bbc9244 Mon Sep 17 00:00:00 2001 From: Jeremy Kidwell Date: Thu, 9 Dec 2021 10:16:29 +0000 Subject: [PATCH] tiding a wee bit --- To-do list Markdown.Rmd | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/To-do list Markdown.Rmd b/To-do list Markdown.Rmd index c281d6d..ba63a83 100644 --- a/To-do list Markdown.Rmd +++ b/To-do list Markdown.Rmd @@ -5,31 +5,13 @@ output: html_document ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) +library(ggplot2) ``` -## R Markdown - -This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see . - -When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this: - -```{r cars} -summary(cars) -``` - -## Including Plots - -You can also embed plots, for example: - -```{r pressure, echo=FALSE} -plot(pressure) -``` - -Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot. - # Upload Data ```{r Upload Data} TSR_data <- read.csv("./data/TSR data complete.csv") +subject_data <- read.csv("./data/Subject data.csv") ``` # Basic summary visualisations (RH): @@ -55,7 +37,6 @@ gender_pie <- pie(table(TSR_data$Gender)) ``` - Q17 (ethnic self-id) ```{r ethnic self-id} -library(ggplot2) TSR_data$Ethnicity <- factor(TSR_data$Ethnicity, levels = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 ,18, 19), labels = c("Arab", "Asian/Asian British - Indian", "Asian/Asian British - Pakistani", "Asian/Asian British - Bangladeshi", "Asian/Asian British - Chinese", "Asian/Asian British - Any other Asian background", "Black/Black British - African", "Black/Black British - Caribbean", "Black/Black British - Any other Black background", "Mixed/Multiple Ethnic Groups - White and Black Caribbean", "Mixed/Multiple Ethnic Groups - White and Black African", "Mixed/Multiple Ethnic Groups - White and Black Asian", "Mixed/Multiple Ethnic Groups - Any other Mixed/Multiple Ethnic background", "White - English/Welsh/Scottish/Northern Irish/British", "White - Irish", "White - Gypsy or Irish Traveller", "White - Any other White background", "Other Ethnic group, please describe", "Prefer not to say")) Ethnicity_bar <- ggplot(TSR_data, aes(Ethnicity)) + geom_bar() + coord_flip() @@ -82,8 +63,6 @@ Religious_affiliation_bar # The way the code is now - the below will help you visualize overall across the entire respondent cohort what the understanding, interest, and view of employability are by subject -subject_data <- read.csv("./data/Subject data.csv") - #Q5 Subject Knowledge/Understanding subject_data$Subject <- factor(subject_data$Subject, levels = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), labels = c("Philosophy", "Sociology", "Psychology", "History", "Ethics", "Theology", "Religious Studies", "Politics", "English", "Math", "Computer Science", "Business")) @@ -124,6 +103,4 @@ employability_bar - Q8-9 responses - Q18 responses - Q17 - - Q18 - - + - Q18 \ No newline at end of file