The case of 5 major U.S. cities


nternationally, crime devastates countries. Increased crime results in harmful effects for legal economies. Investments from foreign and domestic sources are discouraged, and firms become less competitive as a result of crime. Crime also threatens the personal security of a country’s citizens, thus negatively impacting the overall health and well-being of individuals. Those victimized by crime experience mental-health disorders such as insomnia, depression, and anxiety at increased rates. Therefore, the negative health effects associated with crime can contribute to social disengagement, thus weakening overall social cohesion of communities.

In order to address perpetuators of crime, Wilson & Kelling proposed the “broken window theory” (1982). Such theory disputes that regardless of neighborhood, neglected property encourages further neglect and destruction of property. Such theory insists that increased incidents of crime are associated with increased instances of community neglect. Further argued, the “broken window theory” suggests that minor forms of neglect, such as garbage-littered streets and broken street lamps, have the greatest contributions to criminal activity, for the existence of disorder may allude that the actions of individuals’ go unaccounted for.

Many cities across the US have based their policing practices off the work of Willson & Kelling (Andersson, 2015; Harcourt, 2009). Law enforcement efforts have been focused on instances of “disorder”, resulting in unwarranted police stops and searches in communities deemed “disorderly” in hopes of mitigating crime (Murakawa & Beckett, 2010). While the effectiveness of such policing practices has been questioned, the validity of the overarching theory in which such policies have been based upon deserves further scrutiny. Are aspects of neighborhood “cleanliness” and “order” true indicators of criminal activity?

In order to answer this question, the relationship between crime and elements of the urban fabric that contribute to the “cleanliness” and “care” of streets are assessed across five United States (US) cities; San Francisco, Los Angeles, Boston, Philadelphia, and Washington D.C. Such analysis examines if trash can availability, street light presence, and the existence of trees in urban communities relate to crime.  With the use of a predictive model, such analysis also examines if the existence of such elements (trash cans, street lights, and trees) can predict instances of crime. Code used for this study can be found here.


For this study datasets from various open data sources were used, as shown below:

Crime, Street Trees, Street Lights and Trash Cans

Post collection of data from a variety of publicly accessible sources, occurrences of crime, street trees, trash cans, and street lights were aggregated by voting precinct for each city studied. Visualization of our variables on a map show that each city displays a unique distribution of crime, street trees, street lights, and trash cans. Nonetheless, common to all cities is the concentration of crime in hotspots.

Broken Window Theory: Inaccurate and Outdated

The relationship between crime and the variables of interest is examined further. The logarithm of each variable is plotted against the logarithm of number of crimes/km2. On the y-axis log(number of crimes/km2) is present and on the x-axis log(number of street trees/km2) is present. The size of the points is represented by log(number of trash cans/km2) and the color of the points (from dark to light) is represented by log(number of street lights per km2). The logarithm of each variable is used to minimize the effect of outliers on the general trends illustrated in the scatter plot.  

In general, there seems to be a positive correlation between the number of trash cans and crimes. Unexpectedly, there seems to be a positive correlation between trees and crime. The relationship between number of street lights and crime also appears to be positive.

Why These Trends?

Not all trees are equal - Not all crime is equal

In the previous scatter plot, striking trends are observed. For example, in all cities (San Francisco, Los Angeles, Philadelphia, Washington D.C., and Boston) positive correlations between crime and presence of trees are observed. In this context, research on the relationship of trees and crime has provided mixed results. In general, the relationship observed varies greatly depending on the city studied, the type of crimes, and what metric is employed to quantify “trees” (Bogar & Beyer, 2015). Indeed, some studies looking at U.S. west coast cities have shown smaller trees to be associated with increased crime, and larger trees to be instead associated with reduced crime (Donovan & Prestemon, 2010). A recent study on the city of Philadelphia, has found vegetation to be associated with lower rates of assault, robbery, and burglary, but not theft (Wolfe & Mennis, 2012). Additionally, tree health seems to have strong effects on crime as well. A study looking at the relationship between trees and crime rates in Cincinnati, in the context of the emerald ash borer, found that several crime types had significant and positive correlations with infested trees, as opposed to healthy trees (Kondo et al., 2016).

Number of trees vs. tree canopy cover

Furthermore, some literature illustrates that the presence of trees and greater tree canopy cover often decrease crime (Bogar & Meyer, 2015; Kuo & Sullivan, 2011; Troy, Grove, & O’Neil-Dunne, 2012). Notably, tree canopy cover is the most accurate measurement for ecosystem services. Such ecosystem services include shade, cooling, physical and mental health benefits for people, and aesthetic value. Thus, one tree with a large canopy may provide a considerably greater amount of ecosystem services than a multitude of young seedlings with small canopies. Due to data availability, this study, however, utilizes the number of trees present within the city limits, as opposed to tree canopy cover. Thus, potential inaccuracies may exist within this analysis, posing as a limitation to this study and serving as a potential explanation for the trends observed between crime and trees.

Methodology limitations

Additionally, each crime observation has been divided by the area of the precinct for a normalized comparison between observations. More accurate results may have surfaced had crime observations been divided by population instead. Thus, it is also possible that such limitation within this study has resulted in such striking trends observed in the scatter plots. Specifically, in the contexts of San Francisco and Los Angeles, trends are arguably less apparent. Furthermore, while there may be an overall trend observed, the removal of outlying observations could result in a new trend observed within existing clustered observations. With regard to Washington D.C., the large size of precinct boundaries may make it difficult to appropriately capture differences in crime from street to street within precinct boundaries. It is possible that a large amount of variation exists within each precinct boundary. Thus, this limitation may account for the current appearance of Figure 10. In order to better capture the granularity of crime not only in Washington D.C., but also San Francisco, Los Angeles, Philadelphia, and Boston, census blocks are parcel levels could be utilized for this analysis.

Using Public Infrastructure to Predict Crime: A Bayesian Machine Learning Approach

As discussed, the nature of the relationships observed from our data is unclear and such results indicate that hidden variables that influence crime in U.S. cities may have been left out of the analysis. Nonetheless, the correlations that exist between our variables of interest (street trees, street lights, trash cans, and city) and our target variable (crime) are strong enough for a model to be developed. The model built for this study is a Bayesian collider multiple linear regression (mixed) MCMC model. The model is based on the assumption that the crime data are random samples from normal distributions with equal variance and a mean that can be computed from a linear function of the interest variables (or predictor variables).


We model crime as the following equation:

Linear equation used to model crime, where β1-β3 are coefficients for trees, street lights, and trash cans, and  β4-β8 are coefficients for each city (to account for the fixed effect of changing from one city to another)

The model generated 20,000 samples for each of the 8 priors total. By taking the mean of the predicted beta samples from the model output and plugging them into our linear equation for crime (as shown left), the model was capable of predicting crime values relatively close to those observed.

Our model's predicted crime values vs. actual crime in the 5 cities observed