top of page

The following graph shows the temperature and the 7 major felony crimes that occured in 2015 in New York City. The x-axis represents the date for both graphs. The y-axis does not have a specific unit so that both the felony assaults committed and temperaature could be displayed and visualized together. The reason this was done was so that both plots could compared in terms of shape, moments of increases, and moments of decreases. However, as the plots depict there seems to be no apparent correlation between the two elements. Felony incidents occur all year round.The number of felony incidents decrease and increase constantly and in a linear fashion. The temperature also increases and decreases constantly, however, there is an increase in temperature rounding the plot up during the season of summer.

VISUALIZATION

Individual Boroughs

Correlation: 0.0625819186365

Correlation: 0.034651362511

Correlation: -0.00106132311394

Correlation: 0.068681573923

Correlation: -0.00516481173215

The following graphs are formatted the same way as the graph above. These, however, show individual boroughs. Along with the legend to show which plot is which there is also a decimal number preceded by the word "Correlation: ". This number was computed using modified code from Joel Grus (https://github.com/joelgrus) to evaluate the correlation for every borough between the felony incidents there, in 2015, and the temperature. Neither, along with the overall NYC analysis showed nor produced a strong connection or correlation to the temperature, according to this project.

ABOUT US
Our work
CONTACT

ANALYSIS

The correlation computed between the weather and the 7 major felony incidents in the year 2015 in New York City is 0.0518969506925. This means that there is very little to no correlation between the two elements. Together with the visuals above, this project shows no correlation between felony incidents and temperature in the year 2015 and in New York City.

​

This, however, does not conclude the general question does weather affect crime. For this to be completely analyzed all types of crime need to analyzed, along with precipitation, snow depth, more years, and more, if not, all locations. With more information and more analysis a clearer picture can be created from this. At the same time these types of crimes (felony incidents) can be seen to not be affected or have some sort of correlation with the temperature of NYC for the year 2015.

SERVICES

Citations

Code
Datasets
DATA SCIENCE TOPIC

DATASETS

WEATHER

FELONY ASSAULTS

Due to a time constraint, at this moment, not every crime can be reviewed yet. The crime chosen for this project focused on 7 major felony incidents, which include Murder, Felony Assaults, and Rape. The crimes included in the dataset come from all 5 boroughs which make up New York City. This dataset was attained by NYC Open Data site.

For this project a weather dataset was retrieved, from wunderground.com. This information included the 2015 temperatures, precipitation, and snow depth in NYC. Before it could be used in this project the data had to scraped from the site. For this project the temperature was the main focus of the weather.

  • GithubIcon
  • LinkedIn Social Icon

Does weather have an effect on crime?

This project analyses crime, specifically felony incidents, in New York City and compares it to the temperature in an attempt to begin finding a correlation between crime and climate, if one exists. The year focused on in this project is 2015. The 7 major incidents in NYC in 2015 were the crimes focused for this project. My initial hypothesis is that there will be a prominent correlation discovered using the following datasets.
bottom of page