Exploring the NYPD Misconduct Complaint Database

R
git
tidyverse
slides
This is the landing page for slides for my presentation with my colleague Paul Bloom.
Published

November 12, 2020

My cohort-mate and fellow R wonk, Paul Bloom, and I presented these slides for Columbia Foundations for Research Computing. Our presentation focused on cleaning and plotting data on civilian allegations of NYPD misconduct from the New York Civil Liberties Union.

The NYPD Misconduct Complaint Database

From the NYCLU:

The NYPD Misconduct Complaint Database is a repository of complaints made by the public on record at the Civilian Complaint Review Board (CCRB). These complaints span two distinct periods: the time since the CCRB started operating as an independent city agency outside the NYPD in 1994 and the prior period when the CCRB operated within the NYPD. The database includes 323,911 unique complaint records involving 81,550 active or former NYPD officers. The database does not include pending complaints for which the CCRB has not completed an investigation as of July 2020.

Our slides

(For both of these slide previews, you can click inside and use the left & right arrow keys to navigate between slides.)

Part 1: Data Cleaning

Part 2: Plotting, with a focus on using ggalluvial to visualize complaints as they are ruled on by the CCRB, and then by the NYPD itself

Source code

These slides were made with xaringan. They are hosted in their own GitHub repo should you like to clone the code yourself.

They are packaged with an renv lockfile that should allow you to download all the dependency packages to run the code with a few commands. Please note that the project was written primarily in R 4.0.3. If you have R >= 4.0.0, renv::restore() should work smoothly to download our dependency packages, but if you have R 3.x.x you may not find it so easy (some of the dependency versions require 4.0.0 or above).

Hosting the slides and showing them on this page

I used GitHub Pages’ hosting capabilities to host the slides directly from the main repo.

Any GitHub repo can have its contents hosted and deployed using Pages. If it’s a lightweight repo with only a couple HTML pages, as the cu-nypd-ccrb-data repo is, select the “Deploy from a branch” option in the Pages subsection of the repo settings. Leave the selected deploy branch on the default branch–no need for a second gh-pages branch in this case.

The repo will deploy to YOUR-USERNAME.github.io/REPO-NAME/. The README will be rendered as the landing page by default if you don’t have a file named index.html. Your slides will be in there at YOUR-USERNAME.github.io/REPO-NAME/SLIDE-FILE-NAME.html! You can now reference that global link in any other website. Here, I’ve iframed the slides in from their home repo to show up on this page.