This repository contains analytic code and findings related to the BuzzFeed News article, "Trump’s Election Didn’t Spark An Immediate Exodus From The Federal Government," published September 11, 2017. Please read that article, which contains important context and methodological details, before proceeding.
The analysis is based, primarily on federal payroll data provided to BuzzFeed News by the Office of Personnel Management, which we have shared via the Internet Archive.
This repository also includes three data-translation tables, inputs/DTagy.txt
(for agency names), inputs/DTocc.txt
(for occupation names), and inputs/plan-codes.csv
(for pay-plan names). The first two are copied from the Office of Personnel Management's March 2017 FedScope data. The third was extracted from a larger data-translation table (SCTFILE.txt
) provided by OPM with the data above.
The analytic code in this repository produces the following outputs:
This file contains estimated quarterly departure rates, from just before George W. Bush's first election to the quarter ending March 2017. The estimations use two approaches — one based on the employer "Pseudo ID" supplied by OPM until recently, and one based unique names:
These files contain the estimated departure rates for each quarter following the 2000, 2008, and 2016 elections:
turnover-overall.csv
turnover-by-pay-plan.csv
turnover-by-agency.csv
turnover-by-patco.csv
turnover-professionals-by-occupation.csv
turnover-attorneys-by-agency.csv
turnover-by-education.csv
turnover-by-college-degree.csv
To reproduce the findings, you'll need to do the following:
- Ensure that you have installed Jupyter, Python, and the pandas data-analysis library (version 0.19 or higher).
- Download the OPM payroll data and copy the
data
folder into this directory asinputs/fedscope-data
. - Clear the
output/
directory. (Shortcut: runmake clear
.) - Use Jupyter to run each notebook in the
notebooks/
directory consecutively. (Shortcut: runmake reproduce
; requires Python 3.)
Contact Jeremy Singer-Vine at jeremy.singer-vine@buzzfeed.com.
Looking for more from BuzzFeed News? Click here for a list of our open-sourced projects, data, and code.