1a. Create a histogram for employee satisfaction .

1b. Create a histogram for and last evaluation.

2. Create a bar plot for the average satisfaction of employees by the variable that indicates whether they left of stayed at the company.

temp1 <- HR_comma_sep %>% group_by(left) %>% summarise(satisfaction_level = mean(satisfaction_level)) %>% mutate(left = ifelse(left == 0, ‘Stayed’, ‘Left’))

plot_ly( data = temp1, x = ~as.factor(left), y = ~satisfaction_level, color = ~as.factor(left), type = “bar” ) %>% hide_legend() %>% layout( title = ‘Employees Who Left Are 30% Less Satisfied on Average’, plot_bgcolor = “YELLOW”, xaxis = list(title = ’‘), yaxis = list(title = ’Satisfaction’) )

```