The data I used to plot this graph was taken from the U.S. Department of Justices’ Uniform Crime Reporting Statistics, or UCR, file. The file contains the crime statistics taken from every state in the country. In the following graph, I plotted the estimated total occurence of violent crimes in Virginia over a 40 year period starting in 1972. The graph explores the trend of violent crimes over the years and traces the highs and lows, within the state. I that crime has generally gone up since the 1990s and started going down around 2007. I chose to use a line graph because it is good for tracking trends over time. I thought the line graph clearly showed the peaks and plummets of the data and was easy to understand. I chose to use simple colors to keep the focus on the data, but used a simple black in order to draw the eye, without overwhelming it. I bolded the title and axis titles to make them stand out more and I opted to use a descriptive title rather than a legend, so as not to be too busy or redundant in my work.
virginia <- ggplot(data=va,mapping=aes(x=Year,y=Estimated.violent.crime.totals,fill=State)) +
geom_line() +
scale_x_continuous(name="Year",breaks=seq(1972, 2012, 5)) +
scale_y_continuous(name="Total Estimated Violent Crime (per Thousands)",breaks=seq(0,50000,1000)) +
theme_minimal() +
theme(plot.title=element_text(face="bold",size=12),
axis.title=element_text(face="bold",size=10),
legend.position="none") +
labs(title="Yearly Estimated Acts of Violent Crime in Virginia",
subtitle="over a 40 year period",
caption="source: https://www.ucrdatatool.gov/")
virginia
The data I used for this plot was also taken from the U.S. Justice Departments’ Uniform Crime Reporting Statistics file. The following plot compares how the recorded robbery statistics in Arizona, California, Nevada, and New Mexico across a 14 year span. The trends displayed in the graph indicate that the rates of robbery seen in Arizona, Nevada, and New Mexico pale in comparison to those faced in California. This graph was examining the statistic by region rather than by population, so this result is not entirely suprising. I chose to use a bar graph because I thought it offered the clearest picture to the viewer. In other words, it does not leave the viewer trying to figure out what they’re looking at. I chose to use muted grays and calm blues so as not to overtax the eye. I bolded the graph and axis titles so that they more readily stood out against the gray of the rest of the graph. I used the facet wrap function because I felt that the columns and rows function would only mess up the data. Overall, I tried to give the graph a calm look so that the data could do the talking.
cbPalette <- c("Arizona"= "#56B4E9","Nevada"="#009E73","New Mexico"="#E69F00","California"="#0072B2")
c <- ggplot(data=crime,mapping=aes(x=Year,y=Robbery,
fill=State)) +
geom_bar(stat="identity",color="black")+
facet_wrap(vars(State),strip.position=c("right"),nrow=4) +
scale_x_continuous(name="Year",breaks=seq(2000,2014,2),expand=expansion(mult=c(0,0.01))) +
scale_y_continuous(name="Number of Robberies (per Thousand)",
labels=scales::unit_format(unit="",scale=1/1000),
expand=expansion(mult=c(0,0.05))) +
scale_fill_manual(values=cbPalette) +
theme_bw() +
theme(legend.position="none",
plot.title=element_text(face="bold",size=12),
axis.title=element_text(face="bold",size=10)) +
labs(title="Robbery Occurence Since the Turn of the Century",
subtitle="In the Lower Western States of the U.S.",
caption="source: https://www.ucrdatatool.gov/")
c