San Francisco Public Employees: Pay distribution between Police, Nurses, and Fire

Kier O'Neil
Feb 14, 2017

Which Profession Makes More?

The Income Explorer application allows you to:

  • Select from four years worth of San Francisco data beween 2011 to 2014
  • Data is filtered and grouped by profession (Police, Nurse, Fire)
  • Select the type of pay you want to see
  • The violin plot changes to show the density along a continuous income scale

User Interface of Application

Alt text

Dataset record layout

Even though the original data set contains names of people we dropped them for grouping purposes.

I would have liked to included teachers, but teachers were not included in the original dataset.

salaries <- readRDS("pnf_salaries.RDS")
head(salaries)
  Year category  BasePay OvertimePay  OtherPay Benefits
1 2011   Police 155966.0   245131.88 137811.38     <NA>
2 2011   Police 212739.1   106088.18  16452.60     <NA>
3 2011   Police  99722.0    87082.62 110804.30     <NA>
4 2011   Police 198778.0    73478.20  13957.65     <NA>
5 2011   Police 256470.4        0.00  11522.18     <NA>
6 2011   Police 261717.6        0.00   2357.00     <NA>

Acknowledgements

Try out the Income Explorer here: https://kieroneil.shinyapps.io/data_products_shiny_project/

Original dataset can be accessed here: https://www.kaggle.com/kaggle/sf-salaries

Confession

I have to admit that I spent a week trying to get my shiny app to work within a slidify presentation and could never get it to work. Eventually I went back to the assignment and discovered that I may have missinterpreted the instructions. Hopefully I am correct, but if I'm not, at least I'll be able to see how other people did it.