library(tidyverse)
library(ggplot2)
cincy_crimes_data <- read.csv("D:/BANA/Second_Session/Data Wrangling/Classwork/Week 4/cincinnati_crimes_20190812.csv",stringsAsFactors = FALSE)
head(cincy_crimes_data, 10)
attach(cincy_crimes_data)
Cincinnati crime dataset is used to create this visualization to show the percentage of crimes happened on which Day of week and on which floor.
Following are the floor-wise observation of crimes on week day.
From the visualization, it is observed that In Cincinnati Most of the crimes happens on Monday.
cincy_crimes_data %>%
ggplot(aes(x = FLOOR, fill = factor(DAYOFWEEK))) +
geom_bar(position = "fill") +
scale_y_continuous(name = "Percent", labels = scales::percent) +
coord_flip()