Lab 2: Analyzing violent crime (9 pts)#

Read before proceeding#

  • The questions for this lab are embedded within the instructions.

  • Each question carries specific points, clearly indicated alongside it.

  • The questions have subsections within them.

  • The total score for this assignment is 20 points. Your final grade will be scaled from the total points you earn out of the maximum possible score to fit within a 0 to 20 scale.

  • When working on a lab, always create a dedicated folder for it and store all related files within that specific folder. For instance, avoid saving intermediate files in the C:/Documents directory; keep all materials organized and together.

  • Create a word document and name it as Lab-2-answers-YOURLASTNAME.docx. Insert each questions provided in this document and write down your answers for each questions. Upload the .docx file in Canvas. Do NOT upload a .pdf of the document.

  • Upload any additional file(s) required by this instructions in Canvas. You will find specific list of deliverables at the end of this page.

Data#

Download the data from this link

Background#

Broken Bottles#

Despite an overall decline in crime, the bloodshed and violence continues in many of the City’s poorest neighborhoods. Frustrated and distressed, community and religious leaders are calling for immediate action. Citing studies linking alcohol to gang violence and to other violent crime, they are putting pressure on city and state officials to close liquor establishments, to decline new liquor license requests, and to reduce access to alcohol in the most violent neighborhoods. Meanwhile, local business owners are banding together, rallying to block the proposed restrictions. They cite violations of the fifth and fourteenth U.S. Constitutional Amendments and claim the proposed restrictions would negatively impact the social fabric and tourism of the City.

The Chief of Police is asking you, the Crime Analyst, to determine if there is indeed a relationship between violent crime and liquor establishments in your City. She wants your recommendations for an effective solution.

You know that this issue has surfaced for different cities around the country and that a number of research studies have demonstrated a correlation between liquor establishments and violent crime. There are also theoretical explanations supporting this relationship such as routine activity theory and social disorganization theory.

Your workflow is summarized below.

../../_images/fig-1.png

Fig. 39 Broken Bottles#

What data will you need?#

Since you are interested in violent crime, you collect data for the homicides, rape, robbery, aggravated assault, and aggravated battery incidents over the past year. Next, using ArcGIS Business Analyst, you obtain a dataset of businesses that either sell or serve alcohol (this includes bars, nightclubs, lounges, taverns, liquor stores, and so on). If you need additional data, you will use the data enrichment tools in ArcGIS to get it. Your point data is shown below.

../../_images/fig-2.png

Fig. 40 Liquor vendors in blue; Violent crime incidents in brown. It is difficult to discern spatial patterns with so many points on the map.#

Where are the violent crime hot spots? Where are the hot spots for businesses selling or serving alcohol? Do they overlap?#

To make sense of the more than 22,000 crime points, and over 1,500 business points, you map them using hot spot analysis. These maps show you the statistically significant hot spots (red) and cold spots (blue) for violent crime and for liquor establishments. If violent crime is linked to liquor establishments, you expect to see spatial correspondence between their activity spaces.

../../_images/fig-3.png

Fig. 41 Compare the violent crime and liquor vendor hot spot mapsv. The violent crime and liquor vendor hot spot maps look very different.#

You notice some overlap in the downtown area. To ensure that the remediation efforts you propose focus on your city’s most vulnerable neighborhoods, while avoiding areas that could impact tourism, you will need a better understanding of neighborhood poverty patterns within those overlap areas.

Where are the City’s most vulnerable neighborhoods?#

You obtain the data needed to create a hot spot map of poverty.

../../_images/fig-4.png

Fig. 42 Poverty hot spots. The red areas are statistically significant hot spots for poverty.#

Which areas should be included in a moratorium on new liquor licenses?#

You will recommend remediation measures for statistically significant hot spots (99 percent confidence) across all three variables: violent crime, existing liquor establishments, and poverty. To find these areas, you overlay all three maps, keeping only the hot spot locations that overlap.

../../_images/fig-5.png

Fig. 43 Violent crime, liquor vendor, poverty hotspots and their overlaps.#

With the exception of the small overlapping areas identified above, you didn’t find a strong spatial correlation between violent crime and businesses that sell or serve alcohol.

Still, the community representatives have indicated that the problem is serious. While you work with numbers every day, you know that there are real faces—real people—behind your data. You decide to dig deeper.

Has violent crime been increasing in the City? If so, where?#

Space-time pattern mining will show you if violent crime has been increasing or not. The maps below show the results of this analysis. You notice several locations with intensifying violent crime hot spots and a number of persistent hot spots as well. Consecutive hot spots are also worrisome; these represent hot spot locations that have been statistically significant for several of the most recent time periods.

../../_images/fig-6.png

Fig. 44 Violent Crime Trends. There are several concerning trends including new, intensifying, and persistent hot spot areas.#

The 3D map below is zoomed in to the area of both sporadic and consecutive violent crime hot spot trends in the downtown area. The green squares at the base of the map delineate one of the liquor moratorium remediation areas you identified above. Each bin in the 3D stack represents a four-week time period, with the most recent time period at the top. The darkest red bins reflect locations and time periods with intense violent crime activity.

../../_images/fig-7.png

Fig. 45 3D view of violent crime trends downtown.#

There are definitely locations around the City where violent crime is persistent and even intensifying; most of these do not correspond to high densities of businesses serving or selling alcohol, however.

What else might be contributing to violent crime?#

Two years ago the City implemented a Summer Jobs Program that has proven tremendously effective at reducing violent crime. You obtain unemployment data and repeat your hot spot analysis to see if you find a stronger spatial correlation between unemployment and violent crime than you did between liquor establishments and violent crime. Interestingly, you do.

../../_images/fig-8.png

Fig. 46 Compare the violent crime and unemployment hot spot maps. There are a number of locations where the violent crime and unemployment hot spots overlap.#

Where do persistent, intensifying, and consecutive hot spots overlap with unemployment hot spots?#

You will recommend remediation measures for the areas where persistent, intensifying, and consecutive hot spot trends overlap with the statistically significant unemployment hot spots (99 percent confidence).

../../_images/fig-9.png

Fig. 47 Overlap between violent crime trends and unemployment hot spots. The blue areas are the locations where intensifying, persistent, and consecutive hot spot trends overlap with the most intense unemployment hot spots.#

Which specific high schools should be targeted for an expanded summer jobs program?#

You identify high schools within a quarter mile of the remediation areas where high violent crime and high unemployment overlap.

../../_images/fig-10.png

Fig. 48 Selected schools. You will recommend that several schools be included in an expanded summer jobs program.#

Your analyses have gone well! You have several recommendations to propose to the Chief of Police.

Final recommendations#

../../_images/fig-11.png

Fig. 49 Final recommendations.#

Your final report will include the map above showing your recommendations below.

  • Areas with high densities of violent crime, businesses selling or serving alcohol, and poverty. Suggested remediation: Review the existing liquor licenses for violations. Impose a moratorium on new liquor licenses.

    ../../_images/fig-12.png

    Fig. 50 legend1#

  • Areas with intensifying or persistent violent crime and high unemployment rates. Suggested remediation: Add the public high schools within 0.25 miles of these areas to the existing summer jobs program. Consider a PR campaign to make people aware of the tremendous success this program has had on reducing violent crime over the past two years.

    ../../_images/fig-13.png

    Fig. 51 legend2#

  • New violent crime hot spots. Suggested remediation: Assign officers to work with residents and community advocates in these areas to understand what’s behind the sudden increase in violent crime and hopefully keep violent crime in these areas from becoming endemic.

    ../../_images/fig-14.png

    Fig. 52 legend3#

In addition, it will be important to evaluate the space-time violent crime patterns monthly to assess the effectiveness of these remediation measures.

Workflow using ArcGIS Pro#

Do some exploratory data analysis#

  1. If you haven’t done so already, download and unzip the data package provided at the top of this workflow.

  2. Open ArcGIS Pro and browse to the BrokenBottlesPkg.ppkx project package.

  3. Open the Attribute Table of Violent Crime 2014 layer and explore the data.

    Question 1

    a. What Primary Type crimes have been reported in the data? (Note that I am not asking for the total number of crime, I am asking how many classes of primary types crime has been reported in this dataset?) <1 pt>
    b. Which primary type of crime is the most frequent in the area and what is the number? <1 pt>

  4. Download the neighborhood boundary data of Chicago and bring the layer into the Project. (Click the Export and select Shapefile)

    Question 2

    a. Which neighborhood had the highest number of robberies and what was the number? <1 pt>
    b. Which primary type of crime is the most frequent in the area and what is the number? <1 pt>
    c. How did you get these information? Please explain in few sentences about the approach you took. (There are multiple ways to do it, you just need to explain the one you did.) <3 pt>

Create a hot spot map of violent crime densities#

  1. Once the project opens, find and open the Optimized Hot Spot Analysis tool. If the Geoprocessing pane isn’t open, click the Analysis menu tab, then click the Tools button. (Tips: Whenever possible and appropriate, create your workflow output in a geodatabase rather than as a shapefile. Field names in shapefile output may be truncated, and there are other advantages to using a geodatabase to store your data.)

  2. Run the Optimized Hot Spot Analysis tool with the following parameters. The Analysis Boundary layer defines the study area.

    • Input Features : Violent Crime 2014

    • Output Features : the name of your output feature class such as ViolentCrimeHotSpots

    • Incident Data Aggregation Method : Count incidents within fishnet grid

    • Bounding Polygons Defining Where Incidents Are Possible : Analysis Boundary

    ../../_images/fig-15.png

    Fig. 53 Optimized Hot Spot Analysis tool parameters for Violent Crime 2014.#

While the tool runs, it reports the cell size it used for aggregation and the distance it used for analysis (the scale of the analysis). To see this information, hover over the progress bar below the Geoprocessing pane and click the icon to pop out the progress messages. You may resize the message pane by pulling on the lower right corner of the pop out window.

../../_images/fig-16.png

Fig. 54 View tool messages.#

Notice that for this analysis the cell size is 1,375 feet and the scale of analysis is 4,563 feet (4,554 Feet with the most current software).f you are comparing multiple hot spot maps, you will want to make sure that the study area, cell size, and scale of analysis all match.

../../_images/fig-17.png

Fig. 55 Optimized Hot Spot Analysis message output.#

The output map created by Optimized Hot Spot Analysis is shown below:

../../_images/fig-18.png

Fig. 56 Violent crime hot spot map.#

Question 3

a. You used Count incidents within fishnet grid as the Incident Data Aggregation Model. What is fishnet? <1 pt>
b. Similarly there is another option called Count incidents within hexagon grid. Create another Hot Spot map using hexagon grids and look at the differences. In your words, explain when Hexagons can be useful. (Hint: Explore here to find out more.) (Note: For the rest of the analysis, do not use the hot spot results from hexagon, use it from the fishnet.) <2 pt>

Create a hot spot map of liquor vendor densities#

Use the Optimized Hot Spot Analysis tool again with the following parameter settings. You will use the output from the violent crime hot spot analysis to define the study area and cell size.

  • Input Features : Liquor Vendors

  • Output Features : the name of your output feature class such as LiquorVendorHotSpots

  • Incident Data Aggregation Method : Count incidents within aggregation polygons

  • Polygons For Aggregating Incidents Into Counts : ViolentCrimeHotSpots

../../_images/fig-19.png

Fig. 57 Optimized Hot Spot Analysis of liquor vendors, tool parameters.#

Note: Because you used the exact same study area for both analyses, the scale of analysis should match exactly. Be sure to check it, though. Sometimes, when the distributions of points are vastly different, there will be a mismatch. If you do see a mismatch, run Hot Spot Analysis on the output from Optimized Hot Spot Analysis, setting the Distance Band or Threshold Distance parameter explicitly to match the hot spot map you want to compare.

Now you can compare the hot spot maps to see where their activity spaces overlap.

../../_images/fig-20.png

Fig. 58 Violent crime and liquor vendor hot spot maps.#

Question 4

a. Why did you use Count incidents within aggregation polygons in this case? What would have been happened if you created the hot spot map the same way you did for the Violent Crime layer? <2 pt>

Create a hot spot map of poverty#

While you may use the Enrich Layer tool to get poverty data, to ensure your results match those below and to avoid consuming credits, use the data provided in the data package you downloaded. The Enrich Layer tool always gives you the most current data available. When this workflow was created, the ACS poverty data was for 2009-2013.

  1. Navigate to Poverty.lpk included with the data package you downloaded. Drag it on the map.

  2. Find and open the Optimized Hot Spot Analysis tool a third time.

  3. Set the parameters as follows and run the analysis.

    • Input Features: Poverty

    • Output Features: the name of your output feature class such as PovertyHotSpots

    • Analysis Field: 2009-2013 ACS Households with Income Below Poverty Level

../../_images/fig-21.png

Fig. 59 Violent crime and liquor vendor hot spot maps.#

Overlay the hot spot maps to determine areas of overlap#

  1. Find and open the Select Layer By Attribute tool. You will run the tool on all three hot spot maps, each time selecting records where the Gi_Bin field is equal to 3 (a three for this field indicates a statistically significant hot spot at the 99 percent confidence level). The Gi_Bin field name will reflect the scale of analysis (4554 for the most current version of the software).

    ../../_images/fig-22.png

    Fig. 60 Select the most intense violent crime, liquor vendor, and poverty hot spots.#

  2. Next, find and open the Intersect tool. Add all three layers as Input Features, provide a name for the output, such as iCrimeLiquorPoverty, and run the analysis.

    ../../_images/fig-23.png

    Fig. 61 Find the intersection between the violent crime, liquor vendor, and poverty 99 percent confidence level hot spots.#

  3. Clear the selections, and turn off all other layers in order to see the output showing the overlapping locations. These locations will be your proposed areas for a liquor moratorium.

    ../../_images/fig-24.png

    Fig. 62 Areas where the violent crime, liquor vendor, and poverty hot spots overlap.#

Create a hot spot map of unemployment rates#

  1. Navigate to Unemployment.lpk included with the data package you downloaded. Drag it onto the map. Note: The Enrich Layer tool always gives you the most current data available. When this workflow was created, the unemployment rate data was for 2015.

  2. Open the Optimized Hot Spot Analysis tool.

  3. Set the parameters as follows and run the analysis.

    • Input Features: Unemployment

    • Output Features: the name of your output feature class such as UnemploymentRateHotSpots

    • Analysis Field: 2015 Unemployment Rate

    ../../_images/fig-34.png

    Fig. 67 Unemployment rate hot spot map.#

Overlay the violent crime trend map with the unemployment rate hot spot map to determine areas of overlap#

  1. Find and open the Select Layer By Attribute tool. You will use it once to select intensifying, persistent, and consecutive hot spots (Pattern Type COUNT is Equal to Consecutive Hot Spot Or Pattern Type COUNT is Equal to Intensifying Hot Spot Or Pattern Type COUNT is Equal to Persistent Hot Spot) and a second time to select the most intense unemployment rate hot spots (Gi_Bin Fixed 4556_FDR is equal to 3).

    ../../_images/fig-35.png

    Caution: Be sure to click the Add button after creating the expression, otherwise all the features in the layer will be selected.

  2. Next, find and open the Intersect tool. Add the violent crime trends and unemployment rate hot spot maps with their active selections, provide a name for the output results such as iCrimeUnemp, and run the analysis.

    ../../_images/fig-36.png

    Fig. 68 Intersect tool parameters.#

    ../../_images/fig-37.png

    Fig. 69 Overlap of unemployment hot spots with consecutive, persistent and intensifying violent crime trends.#

Finally, select the public high schools within a quarter mile of the overlapping areas#

  1. Find and open the Select Layer By Location tool.

  2. Set the parameters as follows:

    • Input Feature Layer: Public High Schools

    • Relationship: Within a distance

    • Selecting Features: iCrimeUnemp

    • Search Distance: 0.25 Miles

    ../../_images/fig-38.png

    Fig. 70 Select high schools near overlap areas.#

  3. Use the Copy Features tool to copy the selected high schools to a new feature class (this is optional, but it makes mapping and creating reports a bit easier).

    • Input Features: Public High Schools

    • Output Feature Class: the name of your output feature class such as SelectedHighSchools

Question 6

a. Create your Final Crime Remediation Area with necessary legends and basemap layers. Use proper mapping tools in your map. <6 pt>

Analyze Crime Patterns in Saint Louis#

You will do a similar analysis like the above for Saint Louis Crime patterns. I want you to slowly familirize yourself with Open-source Python solutions for different data processing tasks. Therefore, the data cleaning steps are already done for you in this notebook. You do not have to run the codes in the notebook, but feel free to familirize with the modules and functions used here to understand the general notion of data processing tasks.

Data for Saint Louis#

The data you will need for this portion is already processed as .shp files:

  1. Crime Data

  2. Liquor Stores

  3. Median household income

The details about where I collected the data and how I processed it, are well documented in the notebook.

Follow the steps to Create a hot spot map of violent crime densities using the Saint Louis crime data. Do similar tasks for Liquor Stores to Create a hot spot map of liquor vendor densities and Median household income to Create a hot spot map of poverty. Note that for poverty we are using median household income, not the poverty data. So if you take income as your variable, hot spots would represent income hot spots. So for representing poverty hot spots, you would want the cold spots of income. Finally, Overlay the hot spot maps to determine areas of overlap and create a map.

Your task#

Question 7

a. Create an overlap of crime hot spots, liquor store hot spots and income cold spots. Publish a nice map with necessary attributes and other information. <20 pt>

Answers#

Question 1

a. Robbery
b. 9642

Question 2

a. Austin, 721 crimes
b. ** c. **

Question 3

a. Fishnet is a uniform or equidistant grid or square structure composed of polylines or polygons. It can be created by providing row column to spacing information. <1 pt>
b. Hexagons reduce sampling bias due to edge effects of the grid shape, this is related to the low perimeter-to-area ratio of the shape of the hexagon. A circle has the lowest ratio but cannot tessellate to form a continuous grid. Hexagons are the most circular-shaped polygon that can tessellate to form an evenly spaced grid. Hexagons are preferable when your analysis includes aspects of connectivity or movement paths.

Question 4

a. Using Count incidents within aggregation polygons ensured us that the fishnet grids resulted from the liquor vendor data are the same matching polygons from the crime data. If the positions of the points for the two datasets are different (which is very nornal for any two different point features), we should make sure the grid aligns in the hot spot or cold spot shape.

Question 5

a. NetCDF files are multidimensional structured data formats. NetCDFs are extremely useful when we have raster or grid data but at different dimensional level. For example, we can have time series climate data for a location but the temporal dimension is not the only dimension. May be we need to store the different variables like temperature, precipitation, water pressure for the same time series. Now we have several dimensions and NetCDF would be a very efficient way to store this data.

Question 6

a. Create map

Question 7

a. Create map