## Warning: package 'ggplot2' was built under R version 4.4.3

1.Περιγραφή του Dataset

Το dataset Employee Attrition and Factors περιέχει δεδομένα εργαζομένων μιας επιχείρησης και χρησιμοποιείται για την ανάλυση της αποχώρησης προσωπικού. Περιλαμβάνει δημογραφικές πληροφορίες, επαγγελματικά χαρακτηριστικά και δεδομένα ικανοποίησης εργαζομένων. Η πηγή του Dataset είναι το https://www.kaggle.com/search.

2.Αιτιολόγηση της Επιλογής για Επιχειρηματική Αναλυτική

Αυτό το dataset είναι χρήσιμο για:

-Πρόβλεψη αποχωρήσεων εργαζομένων (Attrition Prediction).

-Ανάλυση παραγόντων που επηρεάζουν την ικανοποίηση των εργαζομένων.

-Αξιολόγηση της επιρροής παραμέτρων όπως μισθός, εκπαίδευση, εργασιακή ισορροπία στην παραμονή των εργαζομένων.

3.Πιθανά Επιχειρηματικά Ερωτήματα

  1. Ποιοι παράγοντες επηρεάζουν την αποχώρηση των εργαζομένων;
  2. Ποια τμήματα έχουν υψηλότερη πιθανότητα αποχωρήσεων;
  3. Πώς η εργασιακή εμπειρία σχετίζεται με την παραμονή στην εταιρεία;
  4. Επηρεάζει η εκπαίδευση ή οι αυξήσεις μισθού την αφοσίωση των εργαζομένων;
  5. Υπάρχει σχέση μεταξύ των ωρών εργασίας και της ικανοποίησης εργαζομένων;

4.Περιγραφή των μεταβλητών

  1. Attrition: Whether or not the employee has left the organization. (Categorical)
  2. BusinessTravel: The frequency of business travel for the employee. (Categorical)
  3. DailyRate: The daily rate of pay for the employee. (Numerical)
  4. Department: The department the employee works in. (Categorical)
  5. DistanceFromHome: The distance from home in miles for the employee. (Numerical)
  6. Education: The level of education achieved by the employee. (Categorical)
  7. EducationField: The field of study for the employee’s education. (Categorical)
  8. EmployeeCount: The total number of employees in the organization. (Numerical)
  9. EmployeeNumber: A unique identifier for each employee profile. (Numerical)
  10. EnvironmentSatisfaction: The employee’s satisfaction with their work environment. (Categorical)
  11. Gender: The gender of the employee. (Categorical)
  12. HourlyRate: The hourly rate of pay for the employee. (Numerical)
  13. JobInvolvement: The level of involvement required for the employee’s job. (Categorical)
  14. JobLevel: The job level of the employee. (Categorical)
  15. JobRole: The role of the employee in the organization. (Categorical)
  16. JobSatisfaction: The employee’s satisfaction with their job. (Categorical)
  17. MaritalStatus: The marital status of the employee. (Categorical)
  18. MonthlyIncome: The monthly income of the employee. (Numerical)
  19. MonthlyRate: The monthly rate of pay for the employee. (Numerical)
  20. NumCompaniesWorked: The number of companies the employee has worked for. (Numerical)
  21. Over18: Whether or not the employee is over 18. (Categorical)
  22. OverTime: Whether or not the employee works overtime. (Categorical)
  23. PercentSalaryHike: The percentage of salary hike for the employee. (Numerical)
  24. PerformanceRating: The performance rating of the employee. (Categorical)
  25. RelationshipSatisfaction: The employee’s satisfaction with their relationships. (Categorical)
  26. StandardHours: The standard hours of work for the employee. (Numerical)
  27. StockOptionLevel: The stock option level of the employee. (Numerical)
  28. TotalWorkingYears: The total number of years the employee has worked. (Numerical)
  29. TrainingTimesLastYear: The number of times the employee was taken for training in the last year. (Numerical)
  30. WorkLifeBalance: The employee’s perception of their work-life balance. (Categorical)
  31. YearsAtCompany: The number of years the employee has been with the company. (Numerical)
  32. YearsInCurrentRole: The number of years the employee has been in their current role. (Numerical)
  33. YearsSinceLastPromotion: The number of years since the employee’s last promotion. (Numerical)
  34. YearsWithCurrManager: The number of years the employee has been with their current manager. (Numerical)

5.Υπολογισμός και παρουσίαση περιγραφικών στατιστικών

summary(Employee.Attrition.and.Factors)
##       Age         Attrition         BusinessTravel       DailyRate     
##  Min.   :18.00   Length:1470        Length:1470        Min.   : 102.0  
##  1st Qu.:30.00   Class :character   Class :character   1st Qu.: 465.0  
##  Median :36.00   Mode  :character   Mode  :character   Median : 802.0  
##  Mean   :36.92                                         Mean   : 802.5  
##  3rd Qu.:43.00                                         3rd Qu.:1157.0  
##  Max.   :60.00                                         Max.   :1499.0  
##   Department        DistanceFromHome   Education     EducationField    
##  Length:1470        Min.   : 1.000   Min.   :1.000   Length:1470       
##  Class :character   1st Qu.: 2.000   1st Qu.:2.000   Class :character  
##  Mode  :character   Median : 7.000   Median :3.000   Mode  :character  
##                     Mean   : 9.193   Mean   :2.913                     
##                     3rd Qu.:14.000   3rd Qu.:4.000                     
##                     Max.   :29.000   Max.   :5.000                     
##  EmployeeCount EmployeeNumber   EnvironmentSatisfaction    Gender         
##  Min.   :1     Min.   :   1.0   Min.   :1.000           Length:1470       
##  1st Qu.:1     1st Qu.: 491.2   1st Qu.:2.000           Class :character  
##  Median :1     Median :1020.5   Median :3.000           Mode  :character  
##  Mean   :1     Mean   :1024.9   Mean   :2.722                             
##  3rd Qu.:1     3rd Qu.:1555.8   3rd Qu.:4.000                             
##  Max.   :1     Max.   :2068.0   Max.   :4.000                             
##    HourlyRate     JobInvolvement    JobLevel       JobRole         
##  Min.   : 30.00   Min.   :1.00   Min.   :1.000   Length:1470       
##  1st Qu.: 48.00   1st Qu.:2.00   1st Qu.:1.000   Class :character  
##  Median : 66.00   Median :3.00   Median :2.000   Mode  :character  
##  Mean   : 65.89   Mean   :2.73   Mean   :2.064                     
##  3rd Qu.: 83.75   3rd Qu.:3.00   3rd Qu.:3.000                     
##  Max.   :100.00   Max.   :4.00   Max.   :5.000                     
##  JobSatisfaction MaritalStatus      MonthlyIncome    MonthlyRate   
##  Min.   :1.000   Length:1470        Min.   : 1009   Min.   : 2094  
##  1st Qu.:2.000   Class :character   1st Qu.: 2911   1st Qu.: 8047  
##  Median :3.000   Mode  :character   Median : 4919   Median :14236  
##  Mean   :2.729                      Mean   : 6503   Mean   :14313  
##  3rd Qu.:4.000                      3rd Qu.: 8379   3rd Qu.:20462  
##  Max.   :4.000                      Max.   :19999   Max.   :26999  
##  NumCompaniesWorked    Over18            OverTime         PercentSalaryHike
##  Min.   :0.000      Length:1470        Length:1470        Min.   :11.00    
##  1st Qu.:1.000      Class :character   Class :character   1st Qu.:12.00    
##  Median :2.000      Mode  :character   Mode  :character   Median :14.00    
##  Mean   :2.693                                            Mean   :15.21    
##  3rd Qu.:4.000                                            3rd Qu.:18.00    
##  Max.   :9.000                                            Max.   :25.00    
##  PerformanceRating RelationshipSatisfaction StandardHours StockOptionLevel
##  Min.   :3.000     Min.   :1.000            Min.   :80    Min.   :0.0000  
##  1st Qu.:3.000     1st Qu.:2.000            1st Qu.:80    1st Qu.:0.0000  
##  Median :3.000     Median :3.000            Median :80    Median :1.0000  
##  Mean   :3.154     Mean   :2.712            Mean   :80    Mean   :0.7939  
##  3rd Qu.:3.000     3rd Qu.:4.000            3rd Qu.:80    3rd Qu.:1.0000  
##  Max.   :4.000     Max.   :4.000            Max.   :80    Max.   :3.0000  
##  TotalWorkingYears TrainingTimesLastYear WorkLifeBalance YearsAtCompany  
##  Min.   : 0.00     Min.   :0.000         Min.   :1.000   Min.   : 0.000  
##  1st Qu.: 6.00     1st Qu.:2.000         1st Qu.:2.000   1st Qu.: 3.000  
##  Median :10.00     Median :3.000         Median :3.000   Median : 5.000  
##  Mean   :11.28     Mean   :2.799         Mean   :2.761   Mean   : 7.008  
##  3rd Qu.:15.00     3rd Qu.:3.000         3rd Qu.:3.000   3rd Qu.: 9.000  
##  Max.   :40.00     Max.   :6.000         Max.   :4.000   Max.   :40.000  
##  YearsInCurrentRole YearsSinceLastPromotion YearsWithCurrManager
##  Min.   : 0.000     Min.   : 0.000          Min.   : 0.000      
##  1st Qu.: 2.000     1st Qu.: 0.000          1st Qu.: 2.000      
##  Median : 3.000     Median : 1.000          Median : 3.000      
##  Mean   : 4.229     Mean   : 2.188          Mean   : 4.123      
##  3rd Qu.: 7.000     3rd Qu.: 3.000          3rd Qu.: 7.000      
##  Max.   :18.000     Max.   :15.000          Max.   :17.000

6.Δημιουργία διαγραμμάτων

ggplot(Employee.Attrition.and.Factors, aes(x=Age, y=MonthlyIncome, color = Age)) + geom_point(size = 2) + labs(title= "Scatterplot", x="Age", y="Monthly Income", color = "Age")

Παρατηρήσεις:

  1. Θετική συσχέτιση ηλικίας - εισοδήματος: το εισόδημα αυξάνεται με την ηλικία, κάτι που είναι αναμενόμενο καθώς οι εργαζόμενοι αποκτούν περισσότερη εμπειρία και προχωρούν σε ανώτερες θέσεις.
  2. Μεγάλη διασπορά εισοδήματος σε μεγαλύτερες ηλικίες:Οι μεγαλύτεροι σε ηλικία εργαζόμενοι έχουν εισοδήματα που κυμαίνονται από χαμηλά επίπεδα έως και άνω των 20.000.
  3. Χαμηλά εισοδήματα σε νεαρούς εργαζομένους: Οι εργαζόμενοι κάτω των 30 ετών έχουν κατά βάση εισοδήματα κάτω των 5.000, υποδηλώνοντας ότι βρίσκονται σε αρχικές θέσεις καριέρας.
ggplot(Employee.Attrition.and.Factors, aes(x=JobLevel, y=MonthlyIncome, fill=factor(JobLevel))) + geom_boxplot(outlier.color = "red", outlier.shape = 16) +labs(title= "Boxplot", x="Job Level ", y="Monthly Income")

Παρατηρήσεις:

  1. Αύξηση εισοδήματος με το επίπεδο εργασίας: Καθώς το JobLevel αυξάνεται από 1 έως 5, το MonthlyIncome αυξάνεται επίσης. Αυτό δείχνει μια λογική τάση, όσο υψηλότερο είναι το επίπεδο εργασίας, τόσο μεγαλύτερος ο μισθός.
  2. Διασπορά δεδομένων και outliers: Στα επίπεδα JobLevel 1 και 2, υπάρχουν περισσότερα outliers, που υποδηλώνουν μερικούς υπαλλήλους με εξαιρετικά υψηλούς μισθούς συγκριτικά με τους υπόλοιπους στο ίδιο επίπεδο.Στα επίπεδα JobLevel 4 και 5, η διασπορά είναι μικρότερη, κάτι που δείχνει πιο ομοιογενείς μισθούς.
  3. Ομοιογένεια στο JobLevel 5:Το κουτί για το JobLevel 5 είναι πολύ στενό, υποδηλώνοντας μικρή διασπορά μισθών. Αυτό μπορεί να σημαίνει ότι οι υπάλληλοι στο υψηλότερο επίπεδο έχουν σχεδόν παρόμοιες απολαβές.
ggplot(Employee.Attrition.and.Factors, aes(x=Age)) + geom_histogram(binwidth=0.9, fill="purple", color="black") + labs(title="Histogram", x="Age", y="Frequency")

Παρατηρήσεις

  1. Συγκέντρωση δεδομένων: Υπάρχει μια έντονη κορύφωση μεταξύ 30-40 ετών, δείχνοντας ότι οι περισσότερες παρατηρήσεις ανήκουν σε αυτή την ηλικιακή ομάδα, ενώ η συχνότητα μειώνεται σταδιακά μετά τα 45 έτη.
  2. Εύρος ηλικιών: Οι ηλικίες κυμαίνονται από περίπου 15 έως 60 έτη.Τα άκρα (κάτω από 20 και πάνω από 55) έχουν χαμηλότερες τιμές.
  3. Σχήμα κατανομής: Οι περισσότερες τιμές συγκεντρώνονται μεταξύ 25 και 40 ετών, με τη μέγιστη συχνότητα κοντά στα 35 έτη. Μετά τα 40, παρατηρείται σταδιακή μείωση των ατόμων σε μεγαλύτερες ηλικίες. Η κατανομή δεν είναι απολύτως συμμετρική, φαίνεται ελαφρώς ασύμμετρη προς τα δεξιά.
ggplot(Employee.Attrition.and.Factors, aes(EducationField)) + geom_bar(width=0.7, fill="purple", color="black") + labs(title="Bar chart", x="Education field", y="Frequency")

Παρατηρήσεις

  1. Life Sciences : εμφανίζουν την μεγαλύτερη συχνότητα με πάνω από 600 εγγραφές.
  2. Medical : Δεύτερο στη σειρά με πάνωω από 400 εγγραφές.
  3. Marketing and Technical Degree: περιέχει μεσαίες εγγραφές, με το Marketing να είναι ελαφρώς πιο συχνό
  4. Human Resources και Other: έχουν τις χαμηλότερες τιμές, με το Human Resources να είναι το λιγότερο συχνό.

7.Συμπεράσματα από τη μελέτη

Εκπαίδευση και εργασιακές τάσεις

  1. Οι περισσότεροι εργαζόμενοι προέρχονται από τον τομέα των Βιοεπιστημών (Life Sciences) και της Ιατρικής (Medical), υποδεικνύοντας υψηλή ζήτηση σε αυτούς τους κλάδους
  2. Τομείς όπως οι Ανθρώπινοι Πόροι (Human Resources) και το “Άλλο” (Other) έχουν τη χαμηλότερη εκπροσώπηση.

Δημογραφικά Στοιχεία και Μισθοί

  1. Οι εργαζόμενοι ηλικίας 30-40 ετών αποτελούν τη μεγαλύτερη πληθυσμιακή ομάδα.
  2. Το εισόδημα αυξάνεται με την ηλικία και το επίπεδο εργασίας, αλλά υπάρχει διακύμανση, ειδικά στις υψηλές θέσεις.

Εργασιακή Εμπειρία και Προαγωγές

  1. Ο μέσος χρόνος παραμονής στην εταιρεία είναι 7 έτη, με σημαντικές διακυμάνσεις.
  2. Οι προαγωγές συνδέονται με μεγαλύτερη εργασιακή εμπειρία, αν και υπάρχουν εξαιρέσεις.

Εργασιακή Απόσταση και Παράγοντες Παραίτησης

  1. Οι περισσότεροι εργαζόμενοι διαμένουν κοντά στον χώρο εργασίας τους.
  2. Παράγοντες όπως η στασιμότητα στην εργασία, η απόσταση από τον χώρο εργασίας και οι οικονομικές απολαβές μπορεί να επηρεάζουν την πιθανότητα παραίτησης.