iyr<- (ccrb$Incident.Year)
loc<- (ccrb$Incident.Location)
reason <-(ccrb$Reason.For.Initial.Contact)
city<-(ccrb$Borough.of.Occurrence)
outcome<-(ccrb$Encounter.Outcome)
yr1<- data.frame(iyr,outcome,city,loc,reason)
g1<-ggplot(yr1,aes(iyr,fill=outcome))+geom_bar()+xlab("Incident Year")+ggtitle("Outcome of Complaint respect to each Year")
g1
We take a look at the city incident year
g2<-ggplot(yr1,aes(iyr,fill=city))+geom_bar()+xlab("Incident Year")+ggtitle("Comlaints of cities vs Year")
g2
we can focus on finding the relationship between the incident location and Reason on initial contact
g3a<-ggplot(yr1,aes(reason,fill=loc))+geom_bar()+xlab("Incident Location")+ggtitle("Comlaints location vs Reason")
g3<- g3a+ theme(axis.text.x=element_text(angle=90,size=7,hjust=1))
g3