Section 1: Introduction

In this project, I will be examining stop, question and frisk data from the New York Police Department in 2022. Some questions I will be answering are as follows:

Below, a portion of the data I will be using is shown.

##   STOP_ID STOP_FRISK_DATE STOP_FRISK_TIME YEAR2  MONTH2     DAY2
## 1       1          1/1/22         8:40:00  2022 January Saturday
## 2       2          1/1/22         3:25:00  2022 January Saturday
## 3       3          1/1/22         0:19:00  2022 January Saturday
## 4       4          1/1/22         3:00:00  2022 January Saturday
## 5       5          1/1/22         3:00:00  2022 January Saturday
## 6       6          1/1/22        10:30:00  2022 January Saturday
##        STOP_WAS_INITIATED RECORD_STATUS_CODE ISSUING_OFFICER_RANK
## 1 Based on Self Initiated                APP                  POM
## 2 Based on Self Initiated                APP                  POM
## 3 Based on Self Initiated                APP                  POF
## 4      Based on Radio Run                APP                  POM
## 5      Based on Radio Run                APP                  POM
## 6   Based on C/W on Scene                APP                  POM
##   ISSUING_OFFICER_COMMAND_CODE SUPERVISING_OFFICER_RANK
## 1                           73                      LT 
## 2                          183                      SGT
## 3                           52                      LT 
## 4                            9                      LT 
## 5                            9                      LT 
## 6                           47                      SGT
##   SUPERVISING_OFFICER_COMMAND_CODE
## 1                               73
## 2                              183
## 3                              183
## 4                                9
## 5                                9
## 6                               47
##   SUPERVISING_ACTION_CORRESPONDING_ACTIVITY_LOG_ENTRY_REVIEWED
## 1                                                            Y
## 2                                                            Y
## 3                                                            Y
## 4                                                            N
## 5                                                            N
## 6                                                            Y
##   LOCATION_IN_OUT_CODE JURISDICTION_CODE JURISDICTION_DESCRIPTION
## 1                    O                 P                      PSB
## 2               (null)            (null)                   (null)
## 3               (null)            (null)                   (null)
## 4               (null)                 P                      PSB
## 5               (null)            (null)                   (null)
## 6               (null)            (null)                   (null)
##   OBSERVED_DURATION_MINUTES SUSPECTED_CRIME_DESCRIPTION STOP_DURATION_MINUTES
## 1                         1                         CPW                     4
## 2                         1                         CPW                     1
## 3                         1                         CPW                     1
## 4                         5                     ASSAULT                    10
## 5                         5                     ASSAULT                    10
## 6                         5                         CPW                    40
##   OFFICER_EXPLAINED_STOP_FLAG OFFICER_NOT_EXPLAINED_STOP_DESCRIPTION
## 1                           Y                                 (null)
## 2                           Y                                 (null)
## 3                           Y                                 (null)
## 4                           Y                                 (null)
## 5                           Y                                 (null)
## 6                           Y                                 (null)
##   OTHER_PERSON_STOPPED_FLAG SUSPECT_ARRESTED_FLAG SUSPECT_ARREST_OFFENSE
## 1                         N                     Y                    CPW
## 2                         N                     Y                    CPW
## 3                         N                     Y                    CPW
## 4                         Y                     N                 (null)
## 5                         Y                     N                 (null)
## 6                         N                     N                 (null)
##   SUMMONS_ISSUED_FLAG SUMMONS_OFFENSE_DESCRIPTION OFFICER_IN_UNIFORM_FLAG
## 1                   N                      (null)                       Y
## 2                   N                      (null)                       Y
## 3                   N                      (null)                       Y
## 4                   N                      (null)                       Y
## 5                   N                      (null)                       Y
## 6                   Y                       OTHER                       Y
##   ID_CARD_IDENTIFIES_OFFICER_FLAG SHIELD_IDENTIFIES_OFFICER_FLAG
## 1                          (null)                         (null)
## 2                          (null)                         (null)
## 3                          (null)                         (null)
## 4                          (null)                         (null)
## 5                          (null)                         (null)
## 6                          (null)                         (null)
##   VERBAL_IDENTIFIES_OFFICER_FLAG FRISKED_FLAG SEARCHED_FLAG ASK_FOR_CONSENT_FLG
## 1                         (null)            Y             Y                   N
## 2                         (null)            Y             Y                   N
## 3                         (null)            N             Y              (null)
## 4                         (null)            N             N                   N
## 5                         (null)            N             N                   N
## 6                         (null)            Y             N                   N
##   CONSENT_GIVEN_FLG OTHER_CONTRABAND_FLAG FIREARM_FLAG KNIFE_CUTTER_FLAG
## 1                 N                     N            Y            (null)
## 2                 N                     N            Y            (null)
## 3            (null)                     N            Y            (null)
## 4                 N                     N       (null)            (null)
## 5                 N                     N       (null)            (null)
## 6                 N                     N       (null)            (null)
##   OTHER_WEAPON_FLAG WEAPON_FOUND_FLAG PHYSICAL_FORCE_CEW_FLAG
## 1            (null)                 Y                  (null)
## 2            (null)                 Y                  (null)
## 3            (null)                 Y                       Y
## 4            (null)                 N                  (null)
## 5            (null)                 N                  (null)
## 6            (null)                 N                  (null)
##   PHYSICAL_FORCE_DRAW_POINT_FIREARM_FLAG PHYSICAL_FORCE_HANDCUFF_SUSPECT_FLAG
## 1                                 (null)                               (null)
## 2                                 (null)                               (null)
## 3                                 (null)                                    Y
## 4                                 (null)                               (null)
## 5                                 (null)                               (null)
## 6                                 (null)                               (null)
##   PHYSICAL_FORCE_OC_SPRAY_USED_FLAG PHYSICAL_FORCE_OTHER_FLAG
## 1                            (null)                    (null)
## 2                            (null)                    (null)
## 3                            (null)                    (null)
## 4                            (null)                    (null)
## 5                            (null)                    (null)
## 6                            (null)                    (null)
##   PHYSICAL_FORCE_RESTRAINT_USED_FLAG PHYSICAL_FORCE_VERBAL_INSTRUCTION_FLAG
## 1                             (null)                                      Y
## 2                             (null)                                      Y
## 3                             (null)                                 (null)
## 4                             (null)                                      Y
## 5                             (null)                                      Y
## 6                             (null)                                      Y
##   PHYSICAL_FORCE_WEAPON_IMPACT_FLAG BACKROUND_CIRCUMSTANCES_VIOLENT_CRIME_FLAG
## 1                            (null)                                     (null)
## 2                            (null)                                     (null)
## 3                            (null)                                     (null)
## 4                            (null)                                     (null)
## 5                            (null)                                     (null)
## 6                            (null)                                          Y
##   BACKROUND_CIRCUMSTANCES_SUSPECT_KNOWN_TO_CARRY_WEAPON_FLAG
## 1                                                     (null)
## 2                                                     (null)
## 3                                                     (null)
## 4                                                     (null)
## 5                                                     (null)
## 6                                                     (null)
##   SUSPECTS_ACTIONS_CASING_FLAG
## 1                       (null)
## 2                       (null)
## 3                       (null)
## 4                       (null)
## 5                       (null)
## 6                       (null)
##   SUSPECTS_ACTIONS_CONCEALED_POSSESSION_WEAPON_FLAG
## 1                                                 Y
## 2                                                 Y
## 3                                                 Y
## 4                                            (null)
## 5                                            (null)
## 6                                                 Y
##   SUSPECTS_ACTIONS_DECRIPTION_FLAG SUSPECTS_ACTIONS_DRUG_TRANSACTIONS_FLAG
## 1                           (null)                                  (null)
## 2                           (null)                                  (null)
## 3                           (null)                                  (null)
## 4                                Y                                  (null)
## 5                                Y                                  (null)
## 6                                Y                                  (null)
##   SUSPECTS_ACTIONS_IDENTIFY_CRIME_PATTERN_FLAG SUSPECTS_ACTIONS_LOOKOUT_FLAG
## 1                                       (null)                        (null)
## 2                                       (null)                        (null)
## 3                                       (null)                        (null)
## 4                                       (null)                        (null)
## 5                                       (null)                        (null)
## 6                                       (null)                        (null)
##   SUSPECTS_ACTIONS_OTHER_FLAG SUSPECTS_ACTIONS_PROXIMITY_TO_SCENE_FLAG
## 1                      (null)                                   (null)
## 2                      (null)                                   (null)
## 3                      (null)                                   (null)
## 4                      (null)                                   (null)
## 5                      (null)                                   (null)
## 6                           Y                                        Y
##   SEARCH_BASIS_ADMISSION_FLAG SEARCH_BASIS_CONSENT_FLAG
## 1                           Y                    (null)
## 2                      (null)                    (null)
## 3                      (null)                    (null)
## 4                      (null)                    (null)
## 5                      (null)                    (null)
## 6                      (null)                    (null)
##   SEARCH_BASIS_HARD_OBJECT_FLAG SEARCH_BASIS_INCIDENTAL_TO_ARREST_FLAG
## 1                             Y                                 (null)
## 2                        (null)                                      Y
## 3                        (null)                                      Y
## 4                        (null)                                 (null)
## 5                        (null)                                 (null)
## 6                        (null)                                 (null)
##   SEARCH_BASIS_OTHER_FLAG SEARCH_BASIS_OUTLINE_FLAG
## 1                  (null)                         Y
## 2                  (null)                    (null)
## 3                  (null)                    (null)
## 4                  (null)                    (null)
## 5                  (null)                    (null)
## 6                  (null)                    (null)
##                         DEMEANOR_OF_PERSON_STOPPED SUSPECT_REPORTED_AGE
## 1                                     FLED ON FOOT                   21
## 2                                             #N/A                   25
## 3 NERVOUS CHANGING DIRECTION FROM OFFICERS RUNNING                   15
## 4                                             CALM                   34
## 5                                             CALM                   28
## 6                                          HOSTILE                   30
##   SUSPECT_SEX SUSPECT_RACE_DESCRIPTION SUSPECT_HEIGHT SUSPECT_WEIGHT
## 1        MALE                    BLACK           5.11            195
## 2        MALE                    BLACK            5.1            165
## 3        MALE                    BLACK            5.3            120
## 4        MALE           BLACK HISPANIC            5.9            150
## 5        MALE                    WHITE            5.9            160
## 6        MALE                    BLACK            6.4         (null)
##   SUSPECT_BODY_BUILD_TYPE SUSPECT_EYE_COLOR SUSPECT_HAIR_COLOR
## 1                     U                 BRO                BLK
## 2                     MED               BRO                BLK
## 3                     THN               BRO                BLK
## 4                  (null)               BRO                BLK
## 5                  (null)               BRO                BLK
## 6                     THN               BLK                BRO
##   SUSPECT_OTHER_DESCRIPTION STOP_LOCATION_PRECINCT STOP_LOCATION_SECTOR_CODE
## 1                    (null)                     73                         C
## 2                    (null)                     42                         A
## 3                       N/A                     42                         A
## 4                    (null)                      9                         A
## 5                    (null)                      9                         A
## 6                    (null)                     47                         B
##   STOP_LOCATION_APARTMENT        STOP_LOCATION_FULL_ADDRESS
## 1                  (null) LIVONIA AVENUE && THATFORD AVENUE
## 2                  (null)        WASHINGTON AVE && E 171 ST
## 3                  (null)              E 170 ST && PARK AVE
## 4                  (null)                AVENUE A && E 1 ST
## 5                  (null)                AVENUE A && E 1 ST
## 6                  (null)           E 234 ST && KATONAH AVE
##   STOP_LOCATION_STREET_NAME STOP_LOCATION_X STOP_LOCATION_Y
## 1            LIVONIA AVENUE         1008275          183622
## 2            WASHINGTON AVE         1010997          244468
## 3                  E 170 ST         1010321          243768
## 4                  AVENUE A          988051          202409
## 5                  AVENUE A          988051          202409
## 6                  E 234 ST         1021001          266076
##   STOP_LOCATION_PATROL_BORO_NAME STOP_LOCATION_BORO_NAME
## 1                           PBBN                BROOKLYN
## 2                           PBBX                   BRONX
## 3                           PBBX                   BRONX
## 4                           PBMS               MANHATTAN
## 5                           PBMS               MANHATTAN
## 6                           PBBX                   BRONX

Section 2: Demographic analysis

Section 2.1: Racial and Gender Distribution

## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
## # A tibble: 22 × 4
##    SUSPECT_RACE_DESCRIPTION       SUSPECT_SEX count percentage
##    <chr>                          <chr>       <int>      <dbl>
##  1 (null)                         (null)         97     0.642 
##  2 (null)                         FEMALE          8     0.0530
##  3 (null)                         MALE           87     0.576 
##  4 AMERICAN INDIAN/ALASKAN NATIVE FEMALE          4     0.0265
##  5 AMERICAN INDIAN/ALASKAN NATIVE MALE           21     0.139 
##  6 ASIAN / PACIFIC ISLANDER       FEMALE         22     0.146 
##  7 ASIAN / PACIFIC ISLANDER       MALE          298     1.97  
##  8 BLACK                          (null)         22     0.146 
##  9 BLACK                          FEMALE        616     4.08  
## 10 BLACK                          MALE         8225    54.5   
## # ℹ 12 more rows

This table displays the counts and percentages of stop and frisk subjects by race and gender.

Section 2.2: Percentage Distribution

This bar plot displays the distribution of stop and frisk suspects by gender and race. Based on this plot, it appears there is a large disparity in the number of black men who are subjected to stop and frisks by the NYPD.

Section 4: Reasons for Stops

Section 4.1: Most Common Reasons for Stops

## # A tibble: 26 × 2
##    SUSPECTED_CRIME_DESCRIPTION Count
##    <chr>                       <int>
##  1 CPW                          6908
##  2 ROBBERY                      1544
##  3 PETIT LARCENY                1336
##  4 ASSAULT                      1269
##  5 BURGLARY                     1077
##  6 OTHER                         557
##  7 GRAND LARCENY                 439
##  8 GRAND LARCENY AUTO            434
##  9 MENACING                      414
## 10 CRIMINAL MISCHIEF             238
## # ℹ 16 more rows

Here, a table with reasons for the stop and their counts are shown. Criminal posession of a weapon appears to be the most common reason for a stop, with a count of 6908 in 2022.

This bar graph visualizes the top 10 most common reasons for a stop to help better understand the distribution.

Section 4.2: Relationship Between Stop Reasons and Outcomes

This bar plot displays the rates for summons and arrest for the top 10 most common reasons for a stop. Summons appear to be relatively low for all of the crimes, but is the highest for the stop reason “other”. Arrest rates are highest for petty larceny, which is a theft of property worth less than $1,000. The crime with the lowest arrest rate is criminal posession of a weapon, even though it is the most common reason for a stop.

Section 5: Outcomes of Stops

Section 5.1: Stop and Frisk Percentages for Outcomes

This bar graph displays the percentage of stop and frisk encounters that resulted in an arrest, a summons, or other. Roughly 33% of stops resulted in an arrest, 3% resulted in a summons, and 64% resulted in “other”. The “other” category was calculated by subtracting the number of arrests and summons from the total number of stops.

Section 5.2: Differences in Outcomes by Demographics

Here, a bar graph breaks down stop outcomes by race. The most common result among all races is “other”, with Middle Eastern/Southwest Asian most commonly receiving this outcome. Arrest outcomes are most common in white suspects.

Section 6: Location Analysis

Section 6.1: Neighborhoods/Precincts with the Highest Stop and Frisk Encounters

This bar graph displays the number of stop and frisk encounters by neighborhood. The Bronx and Brooklyn have the highest stop rates, while Staten Island has the lowest.

Section 6.2: Correlation Between Stop Location and Demographic

## Warning in chisq.test(chisq_test): Chi-squared approximation may be incorrect
## 
##  Pearson's Chi-squared test
## 
## data:  chisq_test
## X-squared = 1697.4, df = 28, p-value < 2.2e-16

The results of a Chi-Squared test for race and neighborhood are shown above. The resulting p-value is very low, meaning that the data supports the alternative hypothesis that race and neighborhood are correlated in terms of stop and frisk encounters.

This bar plot displays the number of stop and frisk encounters by race for each neighborhood. In all neighborhoods, black people are the most likely to be stopped, and American Indian/Alaskan Native are the least likely.

Section 7: Weapon and Contraband Discovery

Section 7.1: Frequency of Finding Weapons or Contraband

This bar graph displays the frequency of finding a weapon (firearm, knife, or other) or contraband in a stop. Out of 15,102 encounters, firearms were found 1,187 times, knives were found 1,083 times, other weapons were found 265 times, and contraband was found 875 times.

Section 7.2: Connection Between Weapon/Contraband Discovery and Reason for Stop

The graph above displays the connection between crime/reason for stop, and the discovery of weapons or contraband. The highest instance of discovery of a weapon or contraband is for the crime of criminal posession of a weapon. Most commonly in these encounters, the criminal was found with a firearem.

Section 8: Repeat Encounters

Unfortunately, with the data provided, there is no way to identify which people were encountered in a stop and frisk more than once in 2022. To be able to do this, there would need to be a column in the data that uniquely identifies each criminal with information like name and date of birth.

Section 9: Age and Stop Frequency

Section 9.1: Likelihood of Being Stopped by Age

## Warning: NAs introduced by coercion
## Warning: Removed 1 row containing missing values or values outside the scale range
## (`geom_point()`).

This scatterplot displays the distribution of stop and frisk encounters by age. The number of stops increases from age 13 to 17, peaks around age 17, and then gradually decreases.

Section 9.2: Most common Reasons for Stops by Age Group

The bar graph above displays the most common reason for a stop for each age in the data. It appears the most common reason for a stop between the ages of 13 to 40 is criminal possession of a weapon. After age 40, the reason for stops becomes more diverse and is most commonly petty larceny.

Section 10: Officer Identification

Section 10.1: Officers with Highest Stop and Frisk Counts

## # A tibble: 10 × 2
##    ISSUING_OFFICER_RANK Num_Stops
##    <chr>                    <int>
##  1 "POM"                    12383
##  2 "POF"                     1615
##  3 "SGT"                      424
##  4 "DTS"                      330
##  5 "DT3"                      143
##  6 "LT "                      123
##  7 "CPT"                       28
##  8 "LSA"                       20
##  9 "DI "                       17
## 10 "SSA"                        9

This table displays which officers had the most stop and frisk encounters. By a large margin, male police officers had the most stop and frisk encounters. Of 15,102 stops, 12,383 stops were made by male police officers, which is roughly 82% of stops.

Section 10.2: Outcomes Based on the Officer Involved

This stacked bar chart shows the variation in outcomes for each type of officer. Based on the chart, the least likely outcome from a stop is a summons, and an arrest or “other” seem to be almost evenly split among all officers. DI and SSA officers did not issue any summons during the year of 2022.