In this post, I look at crime rates (per 100,000 people) in 2012 for different crimes in different states. Data from FBI’s Uniform Crime Reports site were used for this analysis. The methodology used by the FBI and the caveats associated with the data can be found on their website. Although this analysis does not get into the causal factors behind the numbers, it is important to note that there are many possible factors at play. FBI’s site also suggests extreme caution in using these numbers. The original spreadsheet downloaded on 13 Dec 2013 can be found here. It was cleaned to retain only crime rate information (per 100,000 people) for the 50 US states. Information on District of Columbia and Peurto Rico were removed. Cleaning was done outside of the R environment in the native format of original data and the cleaned version can be found here. All documents from FBI’s site referred to here can also be found along with other analysis related filesfound here on github.Crime rates (per 100,000 people) for 9 different types of crimes are present for each of the 50 US states. The rest of this document was generated using slidify. Acknowledgements are due to the developers and maintainers of different R packages used here as well as to the wonderful user-community, which has contributed plenty of web-based resources. All interactive charts were generated using rCharts. (Thanks, Ramnath, for your responsiveness.)
 50 10
 “State” “ViolentCrime”
 “MurderNonNegligentManslaughter” “ForcibleRape”
 “Robbery” “AggravatedAssault”
 “PropertyCrime” “Burglary”
 “LarcenyTheft” “MotorVehicleTheft”
Crime rates (per 100,000 people) for 9 different types of crimes are present for each of the 50 US States.
Distribution of each crime type across States
In this chart, you can select a particular crime and the corresponding numbers for different States. You should be able to hover over the bars to get the exact numbers.
Which States had higher rates of different types of crimes?
The heatmap below provides a clue to answering this question. Along the columns are different crimes (you don’t see all labels but if you hover over the rectangle tiles, you should see the crime identified) and along the rows are different States. Values for individual crimes are scaled to a 0 to 1 scale, thereby permitting a visualization of all variables in a better manner. Higher the value for a crime, higher the intensity of red and the scaled value will be closer to 1. Lower the value for a crime, lower the intensity of the red— or white if crime rate is zero.
Few crimes (e.g., forcible rape and murder and nonnegligent manslaughter) seem to have a higher rate in few States and relatively lower rate in others. Others (e.g., larceny theft or property crime) appear to be distributed more uniformly across many States.
Relationship between different types of crimes?
The correlation matrix given below provides some information regarding this. It tells us how related two crimes are to each other. The correlation coefficient, a measure of this relationship, can vary from -1 through +1. A negative coefficient indicates indicates a negative relationship (in red or a shade of red) between the two variables, whereas a positive coefficient indicates that there is a good chance of finding both crimes together.
Classification of different States into groups based on their rates of different crimes
This can be done using k-means clustering. How many clusters to go with?
A 4 cluster solution was decided. Let’s see the characteristics of these clusters using a parallel coordinates plot. For the purposes of this plot, we’ll label MurderNonNegligentManslaughter as just MurderSlaughter.
The parallel coordinates plot shows the average (mean) rate of crimes for different groups of States.
- Group 4 States: Highest crime rates for all crimes except forcible rape, where its average trails States from Group 2.
- Group 3 States: Second highest crime rates (after Group 4) in Property Crime, Burglary, Larceny Theft, and Motor Vehicle Theft. Lower crime rates (third highest in other categories of crimes, and in fact has the lowest Aggravated Assault rate.
- Group 2 States: Highest crime rate for forcible rape, second highest crime rates (after Group 4) in Violent Crime, Murder and Nonnegligent Manslaughter, Robbery and Aggravated Assault. Third highest (after Group 4 and Group 3) in Property Crime, Burglary, Larceny Theft, and Motor Vehicle Theft.
- Group 1 States: The safest of the lot with least crime rates in all categories except Aggravated Assault, where it is slightly above Group 3 States.
In terms of overall safety, States could be potentially be rank in the following manner. Group 1 the safest, followed by Group 3, then Group 2, and lastly Group 4. (The nature of crimes Group 3 is second highest in are less dangerous than the crimes for which Group 2 is second highest in.) When a 3 group solution was attempted using the previously used k-means cluster analysis, States belonging to Group 3 collapsed with States belonging to Group 4. The distinction between crimes in this separate group and others was important enough to warrant a separate group.
Let’s identify States based on their group membership and color code them.
Green for group 1 (the safest among the three groups), a lighter shade of green for group 3 (the second most safe group), a shade of orange for group 2 and red for group 4 States.
Lastly, a choropleth.