plot_ly(hr, x = ~satisfaction_level, type = "histogram") %>%
layout(title = "Most Employees are satisfaction level (0.60)",
xaxis = list(title = "Satisfaction Level"),
yaxis = list(title = "Number of Employees"))
library(plotly)
library(readr)
plot_ly(hr, y = ~last_evaluation, type = "box") %>%
layout(title = "Evaluation Scores",
xaxis = list(title = "Employees"),
yaxis = list(title = "Evaluation Scores"))
library(plotly)
library(readr)
plot_ly(hr, x = ~Department, y = ~average_montly_hours, type = "box") %>%
layout(title = "Monthly Hours by Department",
xaxis = list(title = "Department"),
yaxis = list(title = "Monthly Hours"))
average_satisfaction <- hr %>%
group_by(Department) %>%
summarise(average_satisfaction_level = mean(satisfaction_level, na.rm = TRUE), .groups = 'drop')
plot_ly(average_satisfaction, x = ~Department, y = ~average_satisfaction_level, type = 'bar') %>%
layout(title = "Average Satisfaction Level by Department",
xaxis = list(title = "Department"),
yaxis = list(title = "Average Satisfaction Level"))
The bar graph above displays the average satisfaction level from each department.
Using this bar graph you can visually see how each department’s satisfaction level ranges from other departments.
The different in satisfaction levels is minimal, indicating that all departments are similarly satisfied.