In order to show that there was in fact a relationship between the two variables, I then imported the dataset into the R programming language and conducted a regression analysis, the results of which can be found below. The output shows that for every one degree increase in temperature, there is an increase of 0.72 in the number of personal crimes that are committed. This relationship is extremely statistically significant, with a p-value of 2.2e-16.
Intercept p-value: 0.0242
Personal.Crime Coeff: 0.72492
Personal.Crime Coeff p-value: < 2.2e-16
Residual standard error: 15.46 on 349 degrees of freedom
Multiple R-squared: 0.2159
Adjusted R-squared: 0.2137
F-statistic: 96.11 on 1 and 349 DF
The graph below, constructed using the D3 library, shows the number of daily personal crimes committed and the coloring of the bar chart is based on the average temperature of that day. It is also interactive if you hover over the bars. All temperatures are in degrees Fahrenheit. Note: Some data for personal daily crimes committed were missing from the database.
Magenta: Extremely Cold (Less than 32)
Blue: Cold (32-50)
Yellow: Moderate (50-60)
Orange: Warm (60-75)
Red: Extremely Warm (Greater than 75)The temperature range was from 8.69 degrees (2/14) to 81.5 degrees (7/18) with an average annual temperature of 54.6 degrees.
I included this graph because it provides additional narrative to the study of crimes. One can see that the residuals vs. leverage graph, which allows a researcher to identify outliers that may be influencing their model, is quite compact in this example (indicating that most points follow the same relationship between temperature and number of crimes committed). However, there is one point (labeled as "291") that is an extreme outlier on the righthand side of this graph. In this case, it's because on this day it was particularly warm (50 degrees) but crimes were extremely low. Why might that be? The day was Christmas, an important reminder that crime can be influenced by a lot of factors, both natural occurrences like temperature or even holidays.