-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvisual proj.Rmd
128 lines (80 loc) · 3.44 KB
/
visual proj.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
---
title: "Visualization Project1"
author: "Sayantika Sengupta"
date: "`r Sys.Date()`"
output: pdf_document
fontsize: 18pt
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# __Project Data set Chosen:__ Police Brutality
## __Source:__ Kaggle data set
### Introduction:
The chosen data set contains the information about the _brutal deaths in hands of police in the years 2000 to 2016_. This dataset aims to provide insight into individuals who were killed during altercations with police. It includes information on their age, race, mental health status, weapons they were armed with, and if they were fleeing.The dataset has 12479 rows and 19 coloumns.
This dataset was provided by *FBI* and *the Centers for Disease Control and Prevention*.
### Content:
> **UID**, Unique ID of the murdered
> **Name**, The name of the murdered
> **Age**, The age of the murdered
> **Stages of Life**, The age stage of the murdered
> **Gender**, The Gender of the murdered
> **Race**, The Race of the murdered
> **Date**, The date of death
> **Year**, The year in which the death occurred
> **Quarter**, The Quarter in which the death occurred
> **Month**, The month in which the death occurred
> **Week**, The week in which the death occurred
> **Day**, The day in which the death occurred
> **City**, The City in which the death occurred
> **State**, The State in which the death occurred
> **Region**, The Region in which the death occurred
> **Manner of death**, In what way was the victim killed?
> **Armed**, Did the victim have a weapon?
> **Mental illness**, Was the victim mentally ill?
> **Flee**, Did the victim try to escape?
### Reading the data:
```{r, echo = FALSE}
pol_bru = read.csv("C:\\Users\\Sayantika\\Desktop\\PoliceFatalities2.csv")
head(pol_bru)
```
### Plots and Graphs:
#### *No. of death with age*:
```{r,echo = FALSE}
library(ggplot2)
ggplot(pol_bru,aes(x= Age))+geom_histogram(color = "white", fill = "blue")
```
#### *No. of death with race*:
This graph shows us how the deaths vary for different races.
```{r,echo = FALSE}
library(ggplot2)
ggplot(data = pol_bru,aes(x= Race, fill = Race))+
geom_bar()
```
#### police brutality with years:
We can see that the police brutality roughly increases with time. The peak in brutality is seen in the year 2015.
```{r,echo = FALSE}
ggplot(pol_bru,aes(x= Year))+geom_histogram( binwidth = 1, color = "blue", fill = "sky blue")
```
```{r,echo = FALSE}
ggplot(pol_bru,aes(x= Year, fill = Race))+geom_histogram( binwidth = 1, color = "white")
```
***Brutality in different States***:
```{r,echo=FALSE}
ggplot(data = pol_bru,aes(x= State,fill = Gender))+
geom_bar(width = 0.5)+
theme(axis.text=element_text(size=5))+
coord_flip()
```
#### *Bar Chart of the region of death*:
We can see that the most brutality is seen in the west region.
```{r,echo=FALSE}
ggplot(data = pol_bru,aes(x= Region, fill = Mental_illness))+
geom_bar()
```
#### *Bar diagram of Armed*:
This graph also checks if the person was armed and trying to flee or not.It is also evident that mostly the victims of Police brutality either have Guns and knives or explosives with them or the information about them being armed is unknowned or unarmed.
```{r, echo = FALSE}
ggplot(data = pol_bru,aes(x=Armed , fill = Flee))+
geom_bar()+ coord_flip()+ theme(axis.text=element_text(size=5))
```