Я могу объяснить ...
Поэтому я бы хотел сравнить процент рекомендаций "да" с рекомендациями для каждого рецензента.Не уверен, как это сделать, но я думаю, что гистограмма с процентом да / нет, сложенным рядом друг с другом для каждого рецензента, по сравнению с каждым другим, была бы идеальной.Мне трудно рассчитать проценты, а также составить сам сюжет, хотя я рядом.Также будут приветствоваться любые альтернативы!
ДАННЫЕ
structure(list(Timestamp = structure(c(1542404919, 1542405223,
1542405732, 1542406107, 1542406389, 1542406809, 1542407115, 1542407462,
1542407858, 1542638598, 1542639521, 1542639522, 1542639536, 1542639885,
1542640508, 1542640795, 1542641705, 1542642212, 1542705890, 1542706366
), class = c("POSIXct", "POSIXt"), tzone = "UTC"), Reviewer = c("Dan Wright",
"A", "A", "A", "B", "D",
"C", "C", "D", "D", "E",
"B", "C", "D", "B",
"E", "E", "E", "B",
"A"), `Applicant Name:` = c("Mco", "Kai",
"Shan", "Ken", "Clea", "Roha",
"Ian", "Alex", "Kath", "Evan",
"Jerr", "Beth", "Bria", "Hele",
"Fred", "Sara", "Irma", "Alee",
"Jerr", "Sara"), `Resume Score:` = c(4, 5, 5,
3, 3, 5, 4, 4, 2, 4, 5, 5, 4, 5, 4, 5, 4, 4, 4, 4), `Cover Letter- Motivation Score:` = c(8,
10, 7, 8, 9, 9, 7, 8, 8, 8, 9, 7, 6, 10, 5, 7, 7, 9, 5, 7), `Cover Letter- Strengths Score:` = c(7,
8, 6, 7, 10, 7, 5, 7, 5, 6, 9, 5, 6, 10, 6, 4, 6, 8, 7, 8), `Cover Letter- Experiences Score:` = c(9,
9, 8, 7, 8, 8, 8, 7, 8, 6, 9, 5, 5, 10, 6, 6, 7, 7, 7, 8), `Short Answer Question #1:` = c(7,
8, 5, 8, 6, 5, 7, 6, 9, 7, 9, 8, 7, 10, 6, 9, 8, 8, 8, 8), `Short Answer Question #2:` = c(6,
9, 9, 7, 6, 8, 6, 10, 9, 7, 7, 8, 4, 10, 6, 10, 7, 8, 8, 9),
`Short Answer Question #3:` = c(9, 6, 7, 10, 8, 5, 4, 7,
9, 6, 10, 1, 9, 10, 6, 10, 7, 9, 9, 9), Recomdendation = c("No",
"Yes", "No", "No", "No", "Yes", "Yes", "No", "Yes", "Yes",
"No", "No", "Yes", "Yes", "Yes", "Yes", "Yes", "Yes", "Yes",
"Yes"), `Are there any red flags for this candidate?` = c("None",
"None", "None", "None", "None", "Mentioned potential summer job that he feels would conflict with RA training dates",
"None", "None", "None", "none", "None", "None", "none", "None",
"none", "None", "none", "none", "none", "none")), row.names = c(NA,
-20L), class = c("tbl_df", "tbl", "data.frame"))
КОД
library(readxl)
library(dplyr)
library(ggplot2)
library(ggthemes)
Apps <- read_excel("C:/Users/johnt/Desktop/Residential Education/RA Selection/Application Workbook.xlsx",
sheet = "Application Review")
View(Apps)
yayy <- Apps %>%
group_by(Reviewer, Recomdendation) %>%
summarize(counts = n())
###TURN ME INTO PERCENTS
ggplot(yayy,aes(x=Reviewer,y=Recomdendation,fill=factor(counts)))+
geom_bar(stat="identity",position="dodge")+
scale_fill_discrete(name="Gender",
breaks=c(1, 2),
labels=c("No", "Yes"))+
xlab("Reviewer")+ylab("Percentage")+ theme_economist() +
theme(axis.text.x = element_text(angle = 90))
Короче, я хотел бы посмотреть, какой процент голосов "за" дал каждый рецензенти хотя я думаю, что это лучший способ, я открыт для новых идей!
РЕДАКТИРОВАТЬ: Решено @DiceBoyT;Теперь я хотел бы построить столбчатый график, однако он не позволит мне контролировать мои оси ...
reviewers<- Apps %>%
group_by(Reviewer) %>%
summarise(percent_yes = mean(Recommendation == "Yes")) %>%
arrange(desc(percent_yes))
reviewers <-reviewers[-c(24), ]
ggplot(data = reviewers, mapping = aes(x = reorder(Reviewer, -percent_yes), y = percent_yes)) +
geom_col(fill = "steelblue", color = "white")+
scale_y_continuous(limits=c(.5, 1)) +
xlab("Reviewer")+ylab("Percentage") +
theme(axis.text.x = element_text(angle = 90))