#<REPLACE THIS COMMENT WITH YOR ANSWER>
Lab 2. Exploratory Data Analyses (EDA)
Introduction
Click here to access the lab on Github Classroom: Github Classroom Assignment for Lab 2: Exploratory Data Analyses (EDA)
This lab aims to reinforce the R coding fundamentals we learned last time, while also introducing the process of Exploratory Data Analyses (EDA). This lab will also make suggestions as we work regarding the git workflow. Getting a sense of how often you should commit your code is something you develop over time, and varies from person to person. In this lab I’ll highlight a few times you should consider committing your code and pushing it to github.
The Data
Today we will be looking at stop and frisk data from New York City. Stop and frisk laws in New York allowed officers to stop anyone they had a “reasonable suspicion” was the suspect in a crime. Stop and frisk became a cornerstone in NYC policing.
As a result of some high profile shootings in the late 1990s and mid-2000s, both the New York State Attorney General’s Office and the New York Civil Liberties Union began to examine NYPD stop and frisk activity for racial profiling. With pressure from these organizations, in the mid-2000s, information recorded about stop and frisk incidents were released in public databases. In the early 2010s, when the NYPD’s use of stop and frisk went before the US District Court, this data was integral in proving that stop and frisk was being carried out in NYC in an unconstitutional way. The ruling mandated that the NYPD create a policy outlining when stops were authorized, and since the practice has declined considerably. You can read the ACLU report if you would like to learn more.
We are going to be looking at the 2006 stop and frisk data, which was around the time when the tactic had firmly reached prominence. You will need to download the data separately from this lab repository. We will be downloading it from the National Archive of Criminal Justice Data. You can do so here. First navigate to that page, and click the “Download” button. Then select the “Delimited” option.
You will be asked to create an account. You will want to make one using your Smith Google account. Do so by selecting the Google option to log in, and then selecting your Smith account. You do not need to provide an address, but you will need to specify that Smith is a College/University, and your department (use your major or something close).
Accept the presented agreement, and wait for the download to finish. Once it has, open the zip file. Inside that zip file, navigate to the “ICPSR_21660” and then the “DS0001” directory. Inside that directory will be two files: “21660-0001-Codebook.pdf” and “21660-0001-Data.tsv”. Place the “21660-0001-Codebook.pdf” file in the “docs” folder in your project directory, and place the “21660-0001-Data.tsv” file into the “data” folder in your project directory.
Getting the Data Set Up
Now that you have the data files in our project directory, we can load it into R.
For this lab, we will be working with the following variables from the larger dataset:
- CASEID
- YEAR
- PCT
- DATESTOP
- DAYSTOP2
- PERSTOP
- ARSTMADE
- FRISKED
- SEARCHED
- CONTRABN
- WEPFOUND
- RACE
- SEX
- AGE
#<REPLACE THIS COMMENT WITH YOR ANSWER>
Understanding the Data
#<REPLACE THIS COMMENT WITH YOR ANSWER>
Now that we have the dataframe we will be working with, take some time to get familiar with what all these variables mean. You can read about them in the “21660-0001-Codebook.pdf” we put in the docs/
directory of this project.
Data Exploration
Let’s start to ask some questions of our data and see what we can learn.
#<REPLACE THIS COMMENT WITH YOR ANSWER>
#<REPLACE THIS COMMENT WITH YOR ANSWER>
#<REPLACE THIS COMMENT WITH YOR ANSWER>
#<REPLACE THIS COMMENT WITH YOR ANSWER>
#<REPLACE THIS COMMENT WITH YOR ANSWER>
Important Relationships
#<REPLACE THIS COMMENT WITH YOR ANSWER>
#<REPLACE THIS COMMENT WITH YOR ANSWER>
#<REPLACE THIS COMMENT WITH YOR ANSWER>
#<REPLACE THIS COMMENT WITH YOR ANSWER>
Tying it Together
The analyses you performed here are very similar to those used as part of the legal battle against the use of stop and frisk in New York City. Those trials ultimately concluded that the way NYC officers were performing stops was illegal. Even simple analyses, when looking at important issues, can result in major changes.
Stop and frisk is still used in New York City, but it’s use has declined dramatically in part due to the new oversight imposed to assure racial equity.
#<REPLACE THIS COMMENT WITH YOR ANSWER>