Skip to content

Commit b8d597b

Browse files
committed
Job satisfaction of employee barplot added
1 parent 8ad3d4f commit b8d597b

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

SurveyAnalysisWebApp/server.R

+24
Original file line numberDiff line numberDiff line change
@@ -463,4 +463,28 @@ server<-function(input,output)
463463

464464

465465
})
466+
467+
468+
#what is the job satisfaction of employees
469+
output$JobSatisfaction<-renderHighchart({
470+
471+
JobSatisfactiondf<-SurveyDf %>% select(CurrentJobTitleSelect,JobSatisfaction) %>%
472+
filter(CurrentJobTitleSelect==input$job8) %>%
473+
group_by(JobSatisfaction) %>%
474+
summarise(Count = n()) %>%
475+
mutate(Percentage = round((Count/sum(Count))*100,digits = 2)) %>%
476+
#top_n(15) %>%
477+
arrange(desc(Percentage))
478+
479+
JobSatisfactiondf[1,]<-NA
480+
481+
hchart(na.omit(JobSatisfactiondf),hcaes(x=JobSatisfaction,y=Percentage),type="column",name="Percentage % ",color="#20CB42") %>%
482+
hc_exporting(enabled = TRUE) %>%
483+
hc_title(text="Job Satisfaction of employees",align="center") %>%
484+
hc_add_theme(hc_theme_ffx())
485+
486+
})
487+
488+
489+
466490
}

SurveyAnalysisWebApp/ui.R

+21
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,27 @@ dashboardPage(
517517
br(),
518518

519519

520+
521+
h3("What is the Job satisfaction?",align="center"),
522+
523+
#Type of data storage at work
524+
box(
525+
526+
selectInput("job8",label="Select Job Title",
527+
choices=jobs[,1]),
528+
529+
width=12
530+
),
531+
box(
532+
533+
highchartOutput("JobSatisfaction"),
534+
width=12
535+
) ,
536+
537+
br(),
538+
539+
540+
520541
h3("What is the type of Data storage at Work",align="center"),
521542

522543
#Type of data storage at work

0 commit comments

Comments
 (0)