Sunday, June 28, 2026

Module 1 - Crime Analysis

 In part C of the lab exercise, I generated three distinct maps: a grid-based thematic map, a kernel density map, and a local Moran’s I map, utilizing homicide data from 2017 to identify homicide hotspots within the city of Chicago, Illinois.

Initially, for the grid-based thematic hotspot map, I employed a spatial join to associate the grid cells with the 2017 homicide data. This process resulted in a grid cell representation indicating the number of homicides per cell. I then eliminated all cells with a count of zero and focused on the top 20% of grid cells exhibiting the highest counts. To achieve this, I sorted the data based on the count field in descending order and selected the first 62 records (which corresponds to 20% of 311 records when rounded to the nearest whole number), subsequently exporting these selected records to a new layer. A new integer field named 'dissolved' was added, populated with the value of 1, and this field was utilized to dissolve the feature class into a singular polygon.


In the subsequent step, I utilized the kernel density tool, configuring the output cell size to 100 and the search radius to 2630, with area units set to square miles, to produce a kernel density map. The symbology was modified to exclude zero values and to establish breaks at two values: 3 times the mean and the maximum value. The mean value calculated from the statistics was 5.64, leading to two classifications: values less than or greater than 16.92 (5.64 multiplied by 3) and those exceeding 16.92.

           

I then applied the reclassify tool to categorize the values into three classes: 0, 1, and 2, as 2 being 3*mean and above. Following this, I employed the Raster to Polygon tool; once the conversion to polygon was completed, I utilized the select by attribute function to isolate features with a grid code value of 2, thereby creating a new layer.


In the final phase, I developed a third hotspot map by employing local Moran's I hotspot mapping. This process began with a spatial join between census tracts and the 2017 homicide data, resulting in a new data layer for census tracts that reflects the number of homicides within each census block. I then introduced an additional field to compute the crime rate per 1,000 housing units using the formula ((Join_count/total_households)*100). Subsequently, I utilized the Cluster and Outlier Analysis tool to generate a new layer categorizing areas as HH, HL, LH, and LL. Since our focus was solely on the HH cluster, I applied a SQL query to isolate this specific cluster and exported it to a new layer. Finally, I employed the dissolve tool, selecting the COType IDW field to merge the new layer into a single polygon.

 

          









 







No comments:

Post a Comment