#Introductory Paragraph
Dear Reader,
This markdown file contains information regarding the New York Stop, Question and Frisk policy which was drawn for the year 2020. “Stop, Question and Frisk” policy, allows a Police Officer to stop and question a person when the officer has reasonable suspicion that someone committed, is committing or is about to commit a crime (felony or misdemeanor). The stop-question-and-frisk program, or stop-and-frisk, in New York City, is a New York City Police Department practice of temporarily detaining, questioning, and at times searching civilians and suspects on the street for weapons and other contraband. This is what is known in other places in the United States as the Terry stop. The rules for the policy are contained in the state’s criminal procedure law section 140.50 and based on the decision of the US Supreme Court in the case of Terry v. Ohio. In February 2020, an audio recording surfaced of Michael Bloomberg defending the program at a February 2015 Aspen Institute event. In the speech, Bloomberg said: “Ninety-five percent of murders- murderers and murder victims fit one M.O. You can just take the description, Xerox it, and pass it out to all the cops.”This was a statement made by a victim. He also said that the common descriptions is “They are male, minorities and between the ages of 16-25.” Studies have found that street stops in New York City were not having a beneficial impact on reducing crime in practical terms, meaning that very few of the stops led to actual arrests or weapons found. Furthermore,Most researchers hold the position that stops based on probable cause are more effective at reducing crime. In the same light, Opponents of the program have complained that it is racist and failed to reduce robbery, burglary, or other crime. As Manhattan Borough President, current New York City Comptroller Scott Stringer argued that the program constitutes harassment of blacks and Latinos because it is disproportionately directed at them. The NYC Bar Association casts doubt on whether police were applying the “reasonable suspicion” rule when making stops: “The sheer volume of stops that result in no determination of wrongdoing raise the question of whether police officers are consistently adhering to the constitutional requirement for reasonable suspicion for stops and frisks. In a January 2018 op-ed in the National Review, conservative writer Kyle Smith said that the steep decline in New York City’s crime rate since the reduction in the use of stop-and-frisk had shown him that he was wrong about stop-and-frisk; Smith had earlier argued that reducing stop-and-frisk would increase the crime rate.
# load required packages
library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
## ✔ ggplot2 3.3.6 ✔ purrr 0.3.4
## ✔ tibble 3.1.7 ✔ dplyr 1.0.9
## ✔ tidyr 1.2.0 ✔ stringr 1.4.0
## ✔ readr 2.1.2 ✔ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
library(readr)
library(ggplot2)
library(scales)
##
## Attaching package: 'scales'
## The following object is masked from 'package:purrr':
##
## discard
## The following object is masked from 'package:readr':
##
## col_factor
library(dplyr)
library(highcharter)
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
## Highcharts (www.highcharts.com) is a Highsoft software product which is
## not free for commercial and Governmental use
library(RColorBrewer)
library(ggplotlyExtra)
#Set Working Directory
setwd("~/Desktop/Kenrick_Data 110/Test file/NYPD-Stop-Question-Frisk-2020.csv.download 2")
NYPD<-read_csv("NYPD-Stop-Question-Frisk-2020.csv")
## Rows: 4394 Columns: 83
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (70): STOP_FRISK_DATE, MONTH2, DAY2, STOP_WAS_INITIATED, RECORD_STATUS_...
## dbl (12): STOP_ID, YEAR2, ISSUING_OFFICER_COMMAND_CODE, SUPERVISING_OFFICER...
## time (1): STOP_FRISK_TIME
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
#Use the “str” function to see the structure of your Dataset
str(NYPD)
## spec_tbl_df [4,394 × 83] (S3: spec_tbl_df/tbl_df/tbl/data.frame)
## $ STOP_ID : num [1:4394] 1 2 3 4 5 6 7 8 9 10 ...
## $ STOP_FRISK_DATE : chr [1:4394] "1/1/2020" "1/1/2020" "1/1/2020" "1/1/2020" ...
## $ STOP_FRISK_TIME : 'hms' num [1:4394] 01:12:00 01:11:00 01:11:00 10:18:00 ...
## ..- attr(*, "units")= chr "secs"
## $ YEAR2 : num [1:4394] 2020 2020 2020 2020 2020 2020 2020 2020 2020 2020 ...
## $ MONTH2 : chr [1:4394] "January" "January" "January" "January" ...
## $ DAY2 : chr [1:4394] "Wednesday" "Wednesday" "Wednesday" "Wednesday" ...
## $ STOP_WAS_INITIATED : chr [1:4394] "Based on Radio Run" "Based on Radio Run" "Based on Radio Run" "Based on Radio Run" ...
## $ RECORD_STATUS_CODE : chr [1:4394] "APP" "APP" "APP" "APP" ...
## $ ISSUING_OFFICER_RANK : chr [1:4394] "POM" "POM" "POM" "POM" ...
## $ ISSUING_OFFICER_COMMAND_CODE : num [1:4394] 19 19 19 75 78 19 19 19 19 19 ...
## $ SUPERVISING_OFFICER_RANK : chr [1:4394] "SGT" "SGT" "SGT" "LT" ...
## $ SUPERVISING_OFFICER_COMMAND_CODE : num [1:4394] 19 19 19 75 78 19 19 19 19 19 ...
## $ LOCATION_IN_OUT_CODE : chr [1:4394] "(null)" "I" "I" "O" ...
## $ JURISDICTION_CODE : chr [1:4394] "(null)" "P" "P" "(null)" ...
## $ JURISDICTION_DESCRIPTION : chr [1:4394] "(null)" "PSB" "PSB" "(null)" ...
## $ OBSERVED_DURATION_MINUTES : num [1:4394] 1 1 1 1 0 1 1 1 1 1 ...
## $ SUSPECTED_CRIME_DESCRIPTION : chr [1:4394] "CPW" "CPW" "CPW" "MENACING" ...
## $ STOP_DURATION_MINUTES : num [1:4394] 2 5 5 10 15 5 5 5 5 5 ...
## $ OFFICER_EXPLAINED_STOP_FLAG : chr [1:4394] "Y" "Y" "Y" "Y" ...
## $ OFFICER_NOT_EXPLAINED_STOP_DESCRIPTION : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ OTHER_PERSON_STOPPED_FLAG : chr [1:4394] "Y" "Y" "Y" "N" ...
## $ SUSPECT_ARRESTED_FLAG : chr [1:4394] "Y" "N" "N" "Y" ...
## $ SUSPECT_ARREST_OFFENSE : chr [1:4394] "CPW" "(null)" "(null)" "MENACING" ...
## $ SUMMONS_ISSUED_FLAG : chr [1:4394] "N" "N" "N" "N" ...
## $ SUMMONS_OFFENSE_DESCRIPTION : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ OFFICER_IN_UNIFORM_FLAG : chr [1:4394] "Y" "Y" "Y" "Y" ...
## $ ID_CARD_IDENTIFIES_OFFICER_FLAG : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ SHIELD_IDENTIFIES_OFFICER_FLAG : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ VERBAL_IDENTIFIES_OFFICER_FLAG : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ FRISKED_FLAG : chr [1:4394] "Y" "Y" "Y" "Y" ...
## $ SEARCHED_FLAG : chr [1:4394] "Y" "N" "N" "Y" ...
## $ ASK_FOR_CONSENT_FLG : chr [1:4394] "N" "Y" "Y" "Y" ...
## $ CONSENT_GIVEN_FLG : chr [1:4394] "Y" "Y" "Y" "Y" ...
## $ OTHER_CONTRABAND_FLAG : chr [1:4394] "N" "N" "N" "N" ...
## $ FIREARM_FLAG : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ KNIFE_CUTTER_FLAG : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ OTHER_WEAPON_FLAG : chr [1:4394] "Y" "(null)" "(null)" "(null)" ...
## $ WEAPON_FOUND_FLAG : chr [1:4394] "Y" "N" "N" "N" ...
## $ PHYSICAL_FORCE_CEW_FLAG : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ PHYSICAL_FORCE_DRAW_POINT_FIREARM_FLAG : chr [1:4394] "(null)" "Y" "Y" "(null)" ...
## $ PHYSICAL_FORCE_HANDCUFF_SUSPECT_FLAG : chr [1:4394] "(null)" "(null)" "(null)" "Y" ...
## $ PHYSICAL_FORCE_OC_SPRAY_USED_FLAG : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ PHYSICAL_FORCE_OTHER_FLAG : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ PHYSICAL_FORCE_RESTRAINT_USED_FLAG : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ PHYSICAL_FORCE_VERBAL_INSTRUCTION_FLAG : chr [1:4394] "Y" "Y" "Y" "Y" ...
## $ PHYSICAL_FORCE_WEAPON_IMPACT_FLAG : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ BACKROUND_CIRCUMSTANCES_VIOLENT_CRIME_FLAG : chr [1:4394] "Y" "Y" "Y" "Y" ...
## $ BACKROUND_CIRCUMSTANCES_SUSPECT_KNOWN_TO_CARRY_WEAPON_FLAG: chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ SUSPECTS_ACTIONS_CASING_FLAG : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ SUSPECTS_ACTIONS_CONCEALED_POSSESSION_WEAPON_FLAG : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ SUSPECTS_ACTIONS_DECRIPTION_FLAG : chr [1:4394] "(null)" "(null)" "(null)" "Y" ...
## $ SUSPECTS_ACTIONS_DRUG_TRANSACTIONS_FLAG : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ SUSPECTS_ACTIONS_IDENTIFY_CRIME_PATTERN_FLAG : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ SUSPECTS_ACTIONS_LOOKOUT_FLAG : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ SUSPECTS_ACTIONS_OTHER_FLAG : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ SUSPECTS_ACTIONS_PROXIMITY_TO_SCENE_FLAG : chr [1:4394] "Y" "Y" "Y" "Y" ...
## $ SEARCH_BASIS_ADMISSION_FLAG : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ SEARCH_BASIS_CONSENT_FLAG : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ SEARCH_BASIS_HARD_OBJECT_FLAG : chr [1:4394] "Y" "(null)" "(null)" "(null)" ...
## $ SEARCH_BASIS_INCIDENTAL_TO_ARREST_FLAG : chr [1:4394] "(null)" "(null)" "(null)" "Y" ...
## $ SEARCH_BASIS_OTHER_FLAG : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ SEARCH_BASIS_OUTLINE_FLAG : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ DEMEANOR_CODE : chr [1:4394] "WE" "CM" "CM" "CM" ...
## $ DEMEANOR_OF_PERSON_STOPPED : chr [1:4394] "CALM" "COMPLIANT" "COMPLIANT" "COOPERATIVE" ...
## $ SUSPECT_REPORTED_AGE : num [1:4394] 18 18 17 33 40 19 18 18 19 19 ...
## $ SUSPECT_SEX : chr [1:4394] "MALE" "MALE" "MALE" "MALE" ...
## $ SUSPECT_RACE_DESCRIPTION : chr [1:4394] "BLACK" "BLACK" "WHITE HISPANIC" "BLACK" ...
## $ SUSPECT_HEIGHT : num [1:4394] 6.1 6.2 5.1 6 5.9 5.1 5.1 5.1 6.2 5.8 ...
## $ SUSPECT_WEIGHT : num [1:4394] 160 180 165 220 170 170 165 165 180 200 ...
## $ SUSPECT_BODY_BUILD_TYPE : chr [1:4394] "THN" "THN" "MED" "MED" ...
## $ SUSPECT_EYE_COLOR : chr [1:4394] "BLK" "BRO" "BRO" "BRO" ...
## $ SUSPECT_HAIR_COLOR : chr [1:4394] "BLK" "BLK" "BLK" "BLK" ...
## $ SUSPECT_OTHER_DESCRIPTION : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ STOP_LOCATION_PRECINCT : num [1:4394] 19 19 19 75 78 19 19 19 19 19 ...
## $ STOP_LOCATION_SECTOR_CODE : chr [1:4394] "C" "C" "C" "D" ...
## $ STOP_LOCATION_APARTMENT : chr [1:4394] "(null)" "(null)" "(null)" "(null)" ...
## $ STOP_LOCATION_FULL_ADDRESS : chr [1:4394] "248 E 83 ST" "248 E 83 ST" "248 E 83 ST" "LINDEN BLVD && SHEPHERD AVE" ...
## $ STOP_LOCATION_STREET_NAME : chr [1:4394] "E 83 ST" "E 83 ST" "E 83 ST" "LINDEN BLVD" ...
## $ STOP_LOCATION_X : num [1:4394] 997094 997094 997094 1018441 987763 ...
## $ STOP_LOCATION_Y : num [1:4394] 222002 222002 222002 181412 182543 ...
## $ STOP_LOCATION_ZIP_CODE : chr [1:4394] "10028" "10028" "10028" "11208" ...
## $ STOP_LOCATION_PATROL_BORO_NAME : chr [1:4394] "PBMN" "PBMN" "PBMN" "PBBN" ...
## $ STOP_LOCATION_BORO_NAME : chr [1:4394] "MANHATTAN" "MANHATTAN" "MANHATTAN" "BROOKLYN" ...
## - attr(*, "spec")=
## .. cols(
## .. STOP_ID = col_double(),
## .. STOP_FRISK_DATE = col_character(),
## .. STOP_FRISK_TIME = col_time(format = ""),
## .. YEAR2 = col_double(),
## .. MONTH2 = col_character(),
## .. DAY2 = col_character(),
## .. STOP_WAS_INITIATED = col_character(),
## .. RECORD_STATUS_CODE = col_character(),
## .. ISSUING_OFFICER_RANK = col_character(),
## .. ISSUING_OFFICER_COMMAND_CODE = col_double(),
## .. SUPERVISING_OFFICER_RANK = col_character(),
## .. SUPERVISING_OFFICER_COMMAND_CODE = col_double(),
## .. LOCATION_IN_OUT_CODE = col_character(),
## .. JURISDICTION_CODE = col_character(),
## .. JURISDICTION_DESCRIPTION = col_character(),
## .. OBSERVED_DURATION_MINUTES = col_double(),
## .. SUSPECTED_CRIME_DESCRIPTION = col_character(),
## .. STOP_DURATION_MINUTES = col_double(),
## .. OFFICER_EXPLAINED_STOP_FLAG = col_character(),
## .. OFFICER_NOT_EXPLAINED_STOP_DESCRIPTION = col_character(),
## .. OTHER_PERSON_STOPPED_FLAG = col_character(),
## .. SUSPECT_ARRESTED_FLAG = col_character(),
## .. SUSPECT_ARREST_OFFENSE = col_character(),
## .. SUMMONS_ISSUED_FLAG = col_character(),
## .. SUMMONS_OFFENSE_DESCRIPTION = col_character(),
## .. OFFICER_IN_UNIFORM_FLAG = col_character(),
## .. ID_CARD_IDENTIFIES_OFFICER_FLAG = col_character(),
## .. SHIELD_IDENTIFIES_OFFICER_FLAG = col_character(),
## .. VERBAL_IDENTIFIES_OFFICER_FLAG = col_character(),
## .. FRISKED_FLAG = col_character(),
## .. SEARCHED_FLAG = col_character(),
## .. ASK_FOR_CONSENT_FLG = col_character(),
## .. CONSENT_GIVEN_FLG = col_character(),
## .. OTHER_CONTRABAND_FLAG = col_character(),
## .. FIREARM_FLAG = col_character(),
## .. KNIFE_CUTTER_FLAG = col_character(),
## .. OTHER_WEAPON_FLAG = col_character(),
## .. WEAPON_FOUND_FLAG = col_character(),
## .. PHYSICAL_FORCE_CEW_FLAG = col_character(),
## .. PHYSICAL_FORCE_DRAW_POINT_FIREARM_FLAG = col_character(),
## .. PHYSICAL_FORCE_HANDCUFF_SUSPECT_FLAG = col_character(),
## .. PHYSICAL_FORCE_OC_SPRAY_USED_FLAG = col_character(),
## .. PHYSICAL_FORCE_OTHER_FLAG = col_character(),
## .. PHYSICAL_FORCE_RESTRAINT_USED_FLAG = col_character(),
## .. PHYSICAL_FORCE_VERBAL_INSTRUCTION_FLAG = col_character(),
## .. PHYSICAL_FORCE_WEAPON_IMPACT_FLAG = col_character(),
## .. BACKROUND_CIRCUMSTANCES_VIOLENT_CRIME_FLAG = col_character(),
## .. BACKROUND_CIRCUMSTANCES_SUSPECT_KNOWN_TO_CARRY_WEAPON_FLAG = col_character(),
## .. SUSPECTS_ACTIONS_CASING_FLAG = col_character(),
## .. SUSPECTS_ACTIONS_CONCEALED_POSSESSION_WEAPON_FLAG = col_character(),
## .. SUSPECTS_ACTIONS_DECRIPTION_FLAG = col_character(),
## .. SUSPECTS_ACTIONS_DRUG_TRANSACTIONS_FLAG = col_character(),
## .. SUSPECTS_ACTIONS_IDENTIFY_CRIME_PATTERN_FLAG = col_character(),
## .. SUSPECTS_ACTIONS_LOOKOUT_FLAG = col_character(),
## .. SUSPECTS_ACTIONS_OTHER_FLAG = col_character(),
## .. SUSPECTS_ACTIONS_PROXIMITY_TO_SCENE_FLAG = col_character(),
## .. SEARCH_BASIS_ADMISSION_FLAG = col_character(),
## .. SEARCH_BASIS_CONSENT_FLAG = col_character(),
## .. SEARCH_BASIS_HARD_OBJECT_FLAG = col_character(),
## .. SEARCH_BASIS_INCIDENTAL_TO_ARREST_FLAG = col_character(),
## .. SEARCH_BASIS_OTHER_FLAG = col_character(),
## .. SEARCH_BASIS_OUTLINE_FLAG = col_character(),
## .. DEMEANOR_CODE = col_character(),
## .. DEMEANOR_OF_PERSON_STOPPED = col_character(),
## .. SUSPECT_REPORTED_AGE = col_double(),
## .. SUSPECT_SEX = col_character(),
## .. SUSPECT_RACE_DESCRIPTION = col_character(),
## .. SUSPECT_HEIGHT = col_double(),
## .. SUSPECT_WEIGHT = col_double(),
## .. SUSPECT_BODY_BUILD_TYPE = col_character(),
## .. SUSPECT_EYE_COLOR = col_character(),
## .. SUSPECT_HAIR_COLOR = col_character(),
## .. SUSPECT_OTHER_DESCRIPTION = col_character(),
## .. STOP_LOCATION_PRECINCT = col_double(),
## .. STOP_LOCATION_SECTOR_CODE = col_character(),
## .. STOP_LOCATION_APARTMENT = col_character(),
## .. STOP_LOCATION_FULL_ADDRESS = col_character(),
## .. STOP_LOCATION_STREET_NAME = col_character(),
## .. STOP_LOCATION_X = col_double(),
## .. STOP_LOCATION_Y = col_double(),
## .. STOP_LOCATION_ZIP_CODE = col_character(),
## .. STOP_LOCATION_PATROL_BORO_NAME = col_character(),
## .. STOP_LOCATION_BORO_NAME = col_character()
## .. )
## - attr(*, "problems")=<externalptr>
#Select the first 5 months of the year from January up until May.
#select(MONTH2=="January",MONTH2=="February",MONTH2=="March",MONTH2=="April",MONTH2=="May")
The barchart below is a graphical representation of the first 5 months of the year 2020 with plotted against the crime descriptions which occured that year.
options(scipen = 1)
p <- NYPD%>%
ggplot() +
geom_bar(aes(x=SUSPECTED_CRIME_DESCRIPTION, y= MONTH2, fill = DAY2),
position = "dodge2", stat = "identity") +
ggtitle("Suspected Crimes according to the months of the year") +
ylab("Months of the year") +
xlab("Crime Description") +
labs(fill = "") +
coord_flip()
p
The five months above were used because after creating a visual
representation on tablue with thesame data, it shows that the stop,
question and frisk policy was used mostly between January and May. It
decreased drastically for the rest of the year for reasons not displayed
in the dataset
#Provide Link to Tableau Visualisation https://public.tableau.com/app/profile/kenrick6198/viz/project2_16576236473780/Project2_Data110?publish=yes
#Identify the ranks of officers according to the 5 months selected before
Now in the dataset below, we can see the rate at which the various ranks of officers sent out warrants or gave orders for their colleauges to carry out the “stop, question and frisk” citizens in New York
p2 <- ggplot(NYPD, aes(x =ISSUING_OFFICER_RANK, y= MONTH2, fill = DAY2)) +
ylab("Months of the year") +
xlab("Issuing Officer Ranks") +
theme_minimal(base_size = 12) +
geom_point(alpha = 0.5, color = "purple") +
geom_smooth(method= lm, formula=y~x, se = FALSE, color = "black", lty=2, size = 0.3)
p2
In addition, with the help of tableau, I would create a text table which
displays the months of the year and even shows each day in the year 2020
and how the various ranks of the officers in the NYPD sent out warrants
differently for each crime committed. It shows how the officers tend to
react differently,for instance, when it is a more serious crime, you
would notice how the Commissioner him/herself sends out the warrant from
the court. On the other hand, for petite crimes, the lower ranks tend to
follow the case up
#Post the Link for the Tableau Table Text