HR 데이터 조인

HR Analytics: R로 살펴보는 직원 데이터

Ben Teusch

HR Analytics Consultant

HR 데이터 시스템

  • 직원 데이터
  • 채용/ATS 데이터
  • 복리후생 데이터
  • 보상 데이터
  • 근태 데이터
  • 급여 데이터
  • 성과 데이터
  • ... 기타 부서 데이터 (재무, IT 등)
HR Analytics: R로 살펴보는 직원 데이터

HR 데이터 조인

hr_data
 employee_id  department
           1 Engineering
           2       Sales
bonus_pay_data
 employee_id bonus_amount
           1         3000
           2        10000
left_join(hr_data, bonus_pay_data, by = "employee_id")
 employee_id  department bonus_amount
           1 Engineering         3000
           2       Sales        10000
HR Analytics: R로 살펴보는 직원 데이터

`left_join()` 사용하기

hr_data
  employee_id  department
1           2 Engineering
2           3       Sales
3           4 Engineering
4           5     Finance
bonus_pay_data
  employee_id bonus_amount
1           1         3000
2           2        10000
3           3         2500
4           5         4000
left_join(hr_data, bonus_pay_data, by = "employee_id")
  employee_id  department bonus_amount
1           2 Engineering        10000
2           3       Sales         2500
3           4 Engineering           NA
4           5     Finance         4000
HR Analytics: R로 살펴보는 직원 데이터

기타 조인

다른 조인에 대한 자세한 내용은 Joining Data in R with dplyr를 참고하세요.

HR Analytics: R로 살펴보는 직원 데이터

조인 키 선택

  • 데이터 프레임 조인 시 사원 ID 등 고유 식별자를 사용하세요
  • 이름 사용은 피하세요
HR Analytics: R로 살펴보는 직원 데이터

연습해 봅시다!

HR Analytics: R로 살펴보는 직원 데이터

Preparing Video For Download...