Civilian Complaint Review Board (CCRB)
The second graph shows how people filed the complaints. From the chart we can see that people primarily called to file the complaints.
ggplot(df, aes(df$Incident.Year)) +
geom_freqpoly(binwidth = 1, color = "pink") +
geom_text(stat='count', aes(label = ..count.., vjust = 0)) +
labs(title = "Incident Yearly Trend", x= "Year", y= "Incident Count") +
theme_bw()
From the first graph we can see the allocation of locations with the number of incidents occured. Surpringly, Manhattan is at the third place when it comes to the amount of incidents happend. The first one is Brooklyn with
ggplot(df, aes(df$Borough.of.Occurrence)) +
geom_bar(fill = "steelblue") +
geom_text(stat='count', aes(label = ..count.., vjust = 0)) +
labs(title = "Incident Location", x = "Borough of Occurence", y = "Incident") +
theme_bw()
The second graph shows how people filed the complaints. From the chart we can see that people primarily called to file the complaints.
ggplot(df, aes(df$Complaint.Filed.Mode)) +
geom_bar(fill = "steelblue") +
geom_text(stat='count', aes(label = ..count.., vjust = 0)) +
labs(title = "Complaints Filed Mode", x = "Complaints Filed Mode", y = "Count") +
theme_bw()
In this chart I would like to show the allocation of how the complaints were filed with different locations to see if people have didfernt preference on filing the complaints based on areas. As we can see in the chart, the allocation is pretty equally distributed.
ggplot(df) +
geom_bar(aes(x = df$Borough.of.Occurrence, fill = df$Complaint.Filed.Mode)) +
labs(title = "Incident Location by complain filed mode", y= "Count", x= "Borough of Occurence")+
scale_fill_discrete(name = "Complaint Filed Mode")
In this chart I would like to show the allocation of the incident locations with different areas.
ggplot(df) +
geom_bar(aes(x = df$Borough.of.Occurrence, fill = df$Incident.Location)) +
labs(title = "Incident Area by Incident Location", y= "Count", x= "Borough of Occurence")+
scale_fill_discrete(name = "Incident Loaction")
This chart shows the allocaiton of allegation FADO type by the borough of occurrence
ggplot(df) +
geom_bar(aes(x = df$Borough.of.Occurrence, fill = df$Allegation.FADO.Type)) +
labs(title = "Allegation FADO Type by Borough of Occurrence", y= "Count", x= "Borough of Occurence")+
scale_fill_discrete(name = "Allegation FADO Type")
ggplot(df) +
geom_bar(aes(x = df$Allegation.FADO.Type, fill = df$Encounter.Outcome)) +
labs(title = "Encounter outcome by allrgation FADO type", y= "Count", x= "Allegation FADO Type")+
scale_fill_discrete(name = "Encounter Outcome")
The chart shows the yearly trend on different Allegations FADO types
ggplot(df) +
geom_bar(aes(x = df$Received.Year, fill = df$Allegation.FADO.Type)) +
labs(title = "Yearly trend for Allrgation FADO type", y= "Count", x= "Allegation FADO Type")+
scale_fill_discrete(name = "Allrgation FADO type")
ggplot(df) +
geom_bar(aes(x = df$Received.Year, fill = df$Incident.Location)) +
labs(title = "Incident Location by Year", y= "Count", x= "Year")+
scale_fill_discrete(name = "Incident Location")
ggplot(df) +
geom_bar(aes(x = df$Received.Year, fill = df$Complaint.Contains.Stop...Frisk.Allegations)) +
labs(title = "Frisk Allegation vs. Is Full Investigation by Year", y= "Count", x= "Year")+
scale_fill_discrete(name = "Frisk Allegation vs. Is Full Investigation")