The San Francisco Public Employee dataset

Data acquired from https://www.kaggle.com/kaggle/sf-salaries on 2016-08-27.

I found this dataset on Kaggle.com and was curious about how the pay of professions that form the backbone of any community compare. The dataset includes years 2011-2014. I was looking primarily at Police, Fire, Nurses, and Teachers. The primary question that I wanted answered was whether male-dominated professions like Polie & Fire had significantly different pay vs the female-dominated professions of Nursing & Teaching. Unfortunately this dataset didn’t include teachers which left an important component out.

Exploratory Analysis

During my exploratory analysis I looked for the highest paid employees expecting to see the Mayor, Chief of Police, and Fire Chief at the top. I was surprised to find that none of them were in the top five.

library(tidyverse)
library(readr)

salaries_raw <- read_csv("Salaries.csv")
salaries_raw$Benefits <- as.numeric(salaries_raw$Benefits)
salaries_raw$BasePay[is.na(salaries_raw$BasePay)] <- 0
salaries_raw$OvertimePay[is.na(salaries_raw$OvertimePay)] <- 0
salaries_raw$OtherPay[is.na(salaries_raw$OtherPay)] <- 0
salaries_raw$Benefits[is.na(salaries_raw$Benefits)] <- 0

top_pay <- salaries_raw %>%
    filter(Year == 2014) %>%
    select(EmployeeName:TotalPayBenefits) %>%
    arrange(-TotalPayBenefits) %>%
    select(JobTitle, EmployeeName, TotalPayBenefits)
head(top_pay, 10)
## # A tibble: 10 × 3
##                          JobTitle         EmployeeName TotalPayBenefits
##                             <chr>                <chr>            <dbl>
## 1                  Deputy Chief 3          David Shinn         510732.7
## 2               Asst Med Examiner           Amy P Hart         479652.2
## 3        Chief Investment Officer William J Coaker Jr.         436224.4
## 4                 Chief of Police       Gregory P Suhr         418019.2
## 5          Chief, Fire Department Joanne M Hayes-White         417435.1
## 6               Asst Med Examiner      Ellen G Moffatt         415767.9
## 7                     Dept Head V        John L Martin         401070.9
## 8     Executive Contract Employee    Harlan L Kelly-Jr         398984.5
## 9  Battalion Chief, Fire Suppress           Samson Lai         395361.9
## 10   Asst Chf of Dept (Fire Dept)     David L Franklin         393990.1

A Closer Look

If we look at the details of Deputy Chief Shinn’s Pay there is something very unusual…

highest_pay <- salaries_raw %>%
    filter(Year == 2014) %>%
    select(EmployeeName:TotalPayBenefits) %>%
    arrange(-TotalPayBenefits) %>%
    filter(TotalPayBenefits == max(TotalPayBenefits))

highest_pay_list <- as.list(as.data.frame(t(highest_pay)))
highest_pay_list
## $V1
##     EmployeeName         JobTitle          BasePay      OvertimePay 
##      David Shinn   Deputy Chief 3           129150                0 
##         OtherPay         Benefits         TotalPay TotalPayBenefits 
##         342802.6         38780.04         471952.6         510732.7 
## 8 Levels: 0 129150 342802.6 38780.04 471952.6 510732.7 ... Deputy Chief 3

From this we can see that he earned most of his income through “Other Pay”. A full 67% of his total pay comes from Other Pay. I wonder what that means?

Officer Shinn, you have some explaining to do.

Note: I did a Google search to see if there were any news stories regarding Officer Shinn being the highest paid city employee of San Francisco in 2014 and couldn’t find anything.

If I had to speculate I would guess that Officer Shinn’s Other Income came from some kind of early retirement payout but have found nothing to confirm that.

END