This dataset is simulated
* Fields in the dataset include:
* Employee satisfaction level (satisfaction_level)
* Last evaluation (last_evaluation)
* Number of projects (number_project)
* Average monthly hours (average_montly_hours)
* Time spent at the company (time_spend_company)
* Whether they have had a work accident (Work_accident)
* Whether they have had a promotion in the last 5 years
(promotion_last_5years) * Sales (sales)
* Salary (salary)
* Whether the employee has left (left)
str(hr)
## 'data.frame': 14999 obs. of 10 variables:
## $ satisfaction_level : num 0.38 0.8 0.11 0.72 0.37 0.41 0.1 0.92 0.89 0.42 ...
## $ last_evaluation : num 0.53 0.86 0.88 0.87 0.52 0.5 0.77 0.85 1 0.53 ...
## $ number_project : int 2 5 7 5 2 2 6 5 5 2 ...
## $ average_montly_hours : int 157 262 272 223 159 153 247 259 224 142 ...
## $ time_spend_company : int 3 6 4 5 3 3 4 5 5 3 ...
## $ Work_accident : int 0 0 0 0 0 0 0 0 0 0 ...
## $ left : int 1 1 1 1 1 1 1 1 1 1 ...
## $ promotion_last_5years: int 0 0 0 0 0 0 0 0 0 0 ...
## $ sales : Factor w/ 10 levels "accounting","hr",..: 8 8 8 8 8 8 8 8 8 8 ...
## $ salary : Factor w/ 3 levels "high","low","medium": 2 3 3 2 2 2 2 2 2 2 ...
montly_hours <-hr %>% group_by(salary) %>% summarise(Sum_Montly_Hours=sum(average_montly_hours))
ggplot(data=montly_hours,aes(x=salary,y=Sum_Montly_Hours)) + geom_bar(stat="identity",fill="#00FF84")
SM_satisfaction_level <-hr %>% group_by(sales) %>% summarise(sumsales=mean(satisfaction_level))
ggplot(data=SM_satisfaction_level,aes(x=sales,y=sumsales)) + geom_bar(stat="identity",fill="#00FF84")