Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.

Analyzing racial profiling from Connecticut's traffic stop data

This repository contains source data and analysis code for the Trend CT stories and database Cops, Stops & Race:

Data

Some of the data is too large to be listed in this repo, but can be downloaded elsewhere

  • Stops between October 2014 and September 2015 - CT Data Collaborative
  • [data](https://github.com/trendct/data/tree/master/2016/06/traffic-stops-2016/data) - Folder where all dependent and generated data resides

Walkthroughs

Scripts

  • bubble_chart_maker.R - Converts department-level summaries into a json array for a highcharts connected-scatterplot visualization
  • location_prep.R - Brings in data from an Excel sheet that includes latitude and longitude data for traffic stops from 8 departments. Creates mega.csv
  • town_borders_location_analysis.R - Some exploratory maps looking at location-specific traffic stops along borders of towns
  • officers.R - Run after towns.R. Adds officer-level analysis and adds it to the department-level summary to create mega_df.csv.
  • official_data_merging.R - Creates ccsu_data.csv from various spreadsheets of figures calculated by CCSU's Institute for Municipal and Regional Policy, such as coefficients and k means values.
  • overall_analysis.R - Script that creates a couple bar charts exploring overall stops by day of week and hour of the day
  • points.R - Generates exploratory chart of disparity points based on mega_df.csv
  • scatter_maker.R - Writes three javascript arrays that created scatter plots used in this story
  • time.R - Testing chart visualization of Veil of Darkness data using Hamden locations
  • time_all.R - Adds columns determining if a stop happened in sunlight or darkness, adds time of sunrise, sunset, dusk, dawn, and adds other date-specific info to help chart later on
  • time_version_a.R - Same as above but for 2013-2014 data instead of 2014-2015.
  • towns.R - Run before officers.R. Create a town-level analysis dataframe (mega_town_df11.csv), brings in ccsu_data.csv to replace calculations with CCSU's "official" figures.

Images

  • img folder inlcudes many generated exploratory charts, some of which was used in final stories

Maps

  • maps folder includes shape files used to generate choropleths in the walkthroughs and scriopts

Releases

No releases published

Packages

No packages published

Languages