us_crime_rates | R Documentation |
National data on the number of crimes committed in the US between 1960 and 2019.
us_crime_rates
A data frame with 60 rows and 12 variables.
Year data was collected.
Population of the United States the year data was collected.
Total number of violent and property crimes committed.
Total number of violent crimes committed.
Total number of property crimes committed.
Number of murders committed. Counted in violent total.
Number of forcible rapes committed. Counted in violent total.
Number of robberies committed. Counted in violent total.
Number of aggravated assaults committed. Counted in violent total.
Number of burglaries committed. Counted in property total.
Number of larcency thefts committed. Counted in property total.
Number of vehicle thefts committed. Counted in property total.
library(ggplot2)
ggplot(us_crime_rates, aes(x = population, y = total)) +
geom_point() +
labs(
title = "Crimes V Population",
x = "Population",
y = "Total Number of Crimes"
)
ggplot(us_crime_rates, aes(x = murder)) +
geom_boxplot() +
labs(
title = "US Murders",
subtitle = "1960 - 2019",
x = "Number of Murders"
) +
theme(axis.text.y = element_blank())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.