Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(ggplot2)
- library(dplyr)
- library(lubridate)
- library(scales)
- library(grid)
- library(RColorBrewer)
- library(extrafont)
- library(reshape)
- library(ggthemes)
- by_borough = dplyr::filter(Rat_Sightings_utf, Borough != "Unspecified")
- by_borough$Created.Date <-strptime(as.character(by_borough$Created.Date), "%m/%d/%Y")
- format(by_borough$Created.Date, "%Y-%m-%d")
- by_borough$year <- as.Date(cut(by_borough$Created.Date, breaks="year"))
- by_anio = subset(by_borough, format(as.Date(Created.Date),"%Y") != 2018)
- ## Create Visualization
- ggplot(by_anio, aes(year, ..count..)) +
- geom_bar(position = "stack", alpha=.90, fill="#009E73", size=2)+facet_grid(Borough~.) +
- labs(title="Rat Sightings By Borough (2010 - 2017)", x= "", y=" ") + theme_minimal()
Add Comment
Please, Sign In to add comment