Applications Week 1: Crime Analysis
In this week's lab, we explored different methods of crime analysis and hotspot mapping. In Part A, we created a map of the burglaries per 1,000 housing units for each census tract in DC in 2018.
I had a lot of trouble with the Calculate Field step. First the values needed to be changed to float in order to be divided. It took me a while to figure out how to use the code block in addition to the calculate field expression in the geoprocessing window. Then the 0 values for the Join_Count field of burglaries kept giving me Null results with warnings because it was unable to calculate with the 0 value. Here’s the code block that finally got it work (very simple for how long it took me to get there!):
def calc(join_count, housing):
if join_count == 0:
return 0
else:
return float(join_count) / float(housing) * 1000
if join_count == 0:
return 0
else:
return float(join_count) / float(housing) * 1000
In Part B, we created a kernel density map of assaults with dangerous weapons in DC in 2018.
In Part C, we made three different hotspot maps for homicides in Chicago in 2017. The first map, grid-based thematic mapping, shows the grid cells (1/2 mile) that have homicide numbers in the top 20% for the dataset. One flaw with this method is that the division for the top 20% fell in the middle of a large group of cells with the same number of homicides, some of which were excluded and some of which were included based simply on their order in the table.
Grid overlay
Kernel density
Local Moran's I
When comparing these three hotspot maps of homicides, I believe the kernel density map would be the most useful for a police department to allocate limited resources. It predicts a reasonably high percentage of the 2018 homicides, just slightly lower than the local Moran’s I, but it has a smaller area than the local Moran’s I hotspots, resulting in a higher density of 2018 homicides, almost as high as the grid overlay’s density. The grid overlay, though it has the smallest area for a police department to focus on, is not nearly as good at predicting where the 2018 homicides would be. The local Moran’s I has only a slight advantage over the kernel density in the percentage of homicides predicted, and it has a larger area, which would spread police resources thinner and make them less able to prevent or respond to the predicted homicides.


Comments
Post a Comment