# Distribution of armed status based on race
plt.figure(figsize=(15, 8))
sns.countplot(data=data, y=’armed’, hue=’race’, order=data[‘armed’].value_counts().iloc[:10].index, palette=”viridis”)
plt.title(“Distribution of Armed Status Based on Race (Top 10 Armed Categories)”)
plt.xlabel(“Number of Shootings”)
plt.ylabel(“Armed Status”)
plt.legend(title=”Race”, loc=”lower right”)
plt.show()
Guns: Predominantly, individuals from the White, Black, and Hispanic racial categories are armed with guns. Knives: A significant number of White individuals are armed with knives, followed by Black and Hispanic individuals. Unarmed: A concerning observation is the number of unarmed Black individuals, which is notably high compared to other racial categories. Other categories: Similar trends are observed across other categories, with White individuals being the predominant group, followed by Black and Hispanic individuals. This visualization provides insights into the disparities and patterns related to the armed status of individuals across different racial categories