Visualization One - Complaints by Years

library(ggplot2)

ggplot(ccrb_data, aes(`Incident Year`)) + geom_bar() + ggtitle('Complaints by Years') + xlab('Years') + ylab('Number of Complaints')

We can see from the graph that the number of complaints might not be collected well before 2005. It peaked in 2007 and noticablly and steadily decreased since then.

Visualization Two - Complaints by Year and Colored with Boroughs

ggplot(ccrb_data, aes(`Incident Year`, fill = `Borough of Occurrence`)) + geom_bar() + ggtitle('Complaints by Year and Colored with Borough') + xlab('Years') + ylab('Number of Complaints')

The graph shows that over years out off five boroughs, Brooklyn remains the highest number of complaints while Staten Island is the least problematic.

Visualization Three - Incidents Number by Boroughs

ggplot(ccrb_data, aes(x=ccrb_data$`Borough of Occurrence`)) + geom_bar() + labs(x="Borough of Occurence", y="Number of Incidents", title="Incidents Number by Boroughs")

This graph is incidents by boroughs which proved the previous point. From this graph we can clearly see the comparison between boroughs.

Visualization Four - How Complaints Were Filed

ggplot(ccrb_data, aes(`Incident Year`, fill = `Complaint Filed Mode`)) + geom_bar() + ggtitle('Complaints Methods') + xlab('Years') + ylab('Count')

The graph shows us that the most popular way to file a complaint is by phone and it surpassed other methods by significant amounts.

Visualization Five - Where did the Incidents Happen

ggplot(ccrb_data, aes(x=ccrb_data$`Borough of Occurrence`,fill=ccrb_data$`Incident Location`)) + geom_bar(position = "fill") + scale_fill_discrete(name="Incident Location") + labs(x="Borough of Occurence", y="Proportion of Incident (%)", title=" Incident Locations in Each Borough by Percentage")

The graph tells that most of the incidents happened on the streets.

Visualization Six - Different Encounter Outcomes in each Borough

ggplot(data = ccrb_data, aes(x=ccrb_data$`Borough of Occurrence`,fill=ccrb_data$`Encounter Outcome`)) + geom_bar(position = "fill") + scale_fill_discrete(name="Encounter Outcome") + labs(x="Borough of Occurence", y="Proportion of Incident (%)", title="Percentage of Encounter Outcome in Each Borough")

The graph indicates that almost of the cases results in No arrest or Summons.

Visualization Seven - Misconducts of Police

ccrb_misconducts <- table(ccrb_data$`Allegation FADO Type`)

pie(ccrb_misconducts)

Most reported misconduct of the police is abuse of authority.

Visualization Eight - Video Evidence Helps?

ggplot(ccrb_data, aes(x=ccrb_data$`Complaint Has Video Evidence`,fill=ccrb_data$`Encounter Outcome`)) + geom_bar(position = "fill") + scale_fill_discrete(name="Encounter Outcome") + labs(x="Has Video Evidence", y="Proportion of Incident (%)", title="Percentage of Encounter Outcome with/without Video Evidence")

With video evidence it’s slightly easier for police to arrest.

Visualization Ten - Does Video Evidence Help Investigation?

ggplot(ccrb_data, aes(x = `Is Full Investigation`, fill = `Complaint Has Video Evidence`)) + geom_histogram(stat="count") + theme_minimal() + labs(title = "Fully Investigated Complaints with/without Video Evidence")
## Warning: Ignoring unknown parameters: binwidth, bins, pad

Among all complaints, more cases with video evidence have been fully investigated.