In today’s analysis, I loaded police shooting data from an Excel file into a Pandas DataFrame and aimed to investigate the distribution of justified and unjustified use of force by police across different racial groups, focusing on both male and female incidents. To achieve this, I defined a function to determine whether force was justified based on threat types and weapons involved. I then applied this function to the dataset, creating a new column indicating the justification of force. Subsequently, I filtered the data to include only incidents involving Black, White, Hispanic, and Asian individuals. After separating the data by gender, I calculated the occurrences and percentages of ‘False’ justified force cases for each race. Using Seaborn and Matplotlib, I created bar plots to visually represent these percentages for both male and female incidents. The analysis provides insights into potential disparities in the perceived justification of police force across different racial groups and genders, as visualized in the generated bar plots.
Leave a comment