HTML Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
data
img
maps
tract_disp
.gitignore
analysis_disparity.Rmd
analysis_disparity.html
bubble_chart_maker.R
location_analysis.Rmd
location_analysis.html
location_prep.R
map.Rmd
map.html
mockup.Rmd
mockup.html
mockup_officer.Rmd
mockup_officer.html
officers.R
official_data_merging.R
overall_analysis.R
points.R
readme.MD
scatter_maker.R
search_contraband.Rmd
search_contraband.html
story1.Rmd
story1.html
story1b.Rmd
story1b.html
time.R
time_all.R
time_version_a.R
town_borders_location_analysis.R
towns.R
traffic-stops-2016.Rproj
veil2.Rmd
veil2.html
veil_of_darkness_bubblemaker.R
veilofdarkness.Rmd
veilofdarkness.html

readme.MD

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