Deploy the solution

First, you'll assume the role of a crime analyst preparing for a monthly CompStat meeting. CompStat is a police accountability model for crime reduction, quality of life improvement, and personnel and resource management, allowing police department executives to identify spikes in crimes using comparative statistics and to address those spikes using targeted enforcement.

Your job is to prepare a briefing on the year-to-date (YTD) robberies committed per police precinct. In addition, you'll do the following:

  • Calculate the YTD percentage of change in robbery occurrences per police precinct.
  • Determine the 28-day percentage of change per police precinct.
  • Create a density map showing change from the previous YTD and current YTD robbery occurrences.

These products go into an ArcGIS StoryMaps story briefing to prepare division captains and are also used for the main meeting. To help you perform these tasks, you'll use the Crime Analysis solution. ArcGIS Solutions for ArcGIS Pro is an industry-specific app and capability configuration available to ArcGIS users. The Crime Analysis solution organizes geoprocessing tools used in crime analysis workflows that support data management, tactical and strategic analysis, investigative analysis, and information sharing needs.

Deploy the Crime Analysis solution

First, you'll install ArcGIS Solutions Deployment ArcGIS Pro Add-In.

  1. Sign in to ArcGIS Online or ArcGIS Enterprise.
    Note:

    If you don't have an organizational account, see options for software access.

  2. On the ribbon, click on the app launcher button and choose Solutions.

    Open ArcGIS Solutions from the app launcher.

    The ArcGIS Solutions page appears.

  3. Under Filters, expand Public Safety and select Law Enforcement.

    Law Enforcement filter

  4. In the list of solutions, click Crime Analysis.

    Crime Analysis card

    A window appears describing the purpose of the Crime Analysis solution.

  5. Click Deploy now.

    The Crime Analysis solution is now deployed.

    Note:

    See ArcGIS Solutions for more information.

    If you do not have access to an ArcGIS organization or are using ArcGIS Enterprise, you can download Crime Analysis to your desktop computer.

  6. Browse to your organization's Content page. On the Contents page, under Folders, click the Crime Analysis folder.
  7. For the Crime Analysis file that is a Desktop Application Template, click the More Options button and select Download.

    More Options button for Crime Analysis Desktop Application Template

  8. Extract the contents of CrimeAnalysis.zip into a folder that you will use for the tutorial. Once you have extracted the files, double-click the Crime Analysis ESRI AddInX File to run the installer.

    Crime Analysis AddinX File

  9. Click Install Add-In and click OK when the installation completes.
    Note:

    See Download and install Crime Analysis solution for more information.

You've installed the ArcGIS Solutions add-in. You also deployed the Crime Analysis solution, which you downloaded and installed in ArcGIS Pro.


Prepare the data

Previously, you installed the Crime Analysis add-in. You also downloaded an ArcGIS Pro project. Next, you'll open the project, familiarize yourself with the data, and prepare the data for analysis.

Review the tools and data

First, you'll become familiar with the tools and data available after you installed the Crime Analysis add-in.

  1. Browse to your Crime Analysis folder.
  2. Double-click CrimeAnalysisSolution.aprx.

    The CrimeAnalysisSolution project opens in ArcGIS Pro. It displays a map titled 1. Start Here, which contains notes on how to use the project. The ribbon now includes a Crime Analysis tab. You'll use several tools included on this tab to analyze crime data in preparation for your CompStat briefing.

    Tip:

    In ArcGIS Pro, you can personalize the appearance of the user interface with either a light or a dark theme. In these tutorials, the example images will use the dark theme, but you can use the theme that you prefer. If you want to change the theme, click Options. In the Options window, under Application, click General. Expand Application Theme and choose Dark. You'll need to restart ArcGIS Pro for your theme changes to take effect.

  3. In the Contents pane, uncheck the Notes layer to turn it off.
  4. On the ribbon, click the Crime Analysis tab.

    The tab contains four groups of tools:

    • The Data Management group contains tools to import, clean, enhance, and enrich data.
    • The Selection group contains various selection tools that include a Select Layer By Date and Time tool.
    • The Analysis Tools group contains spatial analysis tools for use in tactical and strategic crime analysis as well as to provide support to investigators exploring the relationships between incidents, suspects, locations, and time.
    • The Information Products group contains tools to share analysis results as information products.

    Next, you'll review the data included with the project.

  5. On the View tab, in the Windows group, click Catalog Pane.
  6. In the Catalog pane, expand Databases, crimeanalysis.gdb, and InputData.

    The geodatabase contains two feature datasets: InputData, which contains feature classes that may be populated with data that can be used as inputs for crime analysis tools, and ToolOutputs, used to contain feature classes that result from analysis.

    Crime analysis geodatabase feature datasets

  7. Collapse Databases. Expand Maps.

    Crime analysis sample maps

    The project includes maps illustrating results generated by various crime analysis tools. Open and examine several of the maps. Most of these maps contain example input data, a notes layer describing how to use the tool, and the results of the tool the map is named after (for instance, 80-20 Analysis contains the results of using the 80-20 Analysis tool).

    Note:

    See Review the Crime Analysis project for more information.

  8. Collapse Maps.

Set up for analysis

Next, you'll start preparing your map and data. First, you'll create a map with a basemap that will look appealing and add relevant contextual information to your crime data. A dark basemap that includes basic information about human geography, such as where buildings and roads are located, should complement crime data well.

  1. In the Catalog pane, click Portal.
  2. Click the Living Atlas button.

    Living Atlas button

  3. In the search box, type human geography and press Enter.
  4. In the search results, right-click Human Geography Dark Map and choose Add And Open.

    Add a basemap.

    A new map named Human Geography Dark Basemap is created. The map contains three layers, one for labels, one for details (such as country boundaries and buildings), and one for the basic shape of continents and other major physical features. You can turn these layers on and off or move them above or below other layers for emphasis.

Locate and add data

Next, you'll add the data you want to analyze to your map. First, you'll add the Precinct layer to the Human Geography Dark Map.

  1. In the Catalog pane, click the Project tab, expand Databases, expand crimeanalysis.gdb, and expand InputData. Drag the Precincts layer onto the map.

    The Precincts layer is added to the map and to the Contents pane.

    Precincts layer added

  2. In the Contents pane, double-click Human Geography Dark Map.

    The Map Properties window appears.

  3. On the General tab, for Name, type Publishing.
  4. Click the Coordinate Systems tab.
  5. In the search box, type WGS 1984 Web Mercator and press Enter.
  6. Expand Projected Coordinate System and World, click WGS 1984 Web Mercator (auxiliary sphere), and click OK.

    The coordinate system is now set to WGS 1984 Web Mercator (auxiliary sphere), which will allow this map to be shared as a web map.

    Next, you'll add robbery data. Before you add it, save the map.

  7. Close the 1. Start Here map.
  8. On the Quick Access Toolbar, click Save.
  9. Download ROBBERIES.zip. Extract the contents of ROBBERIES.zip to your Crime Analysis folder.

    The file contains a Robberies layer file as well as a Robberies.csv file. The files contain fictitious data about robberies that occurred in 2017 and 2018.

  10. In the Catalog pane, expand Folders, CrimeAnalysisSolution and CrimeAnalysis. Drag RobberiesLayer.lpkx onto the map.

    RobberiesLayer layer package from ROBBERIES.zip

    Note:

    The Robberies layer contains the proper symbology, but does not contain any features. You will import features into it later.

    Because your goal is to create an ArcGIS StoryMaps story for use in the CompStat meeting, you'll use this map to publish your data online. It'll include the final analysis layers that you want to show in the story. You'll change the map properties to better suit your intended use for the map.

  11. In the Catalog pane, add the Robberies.csv file to the Publishing map.

    The file is added as a stand-alone table.

    CSV file added

    Next, you'll open the table and explore its data.

  12. In the Contents pane, right-click Robberies.csv and choose Open.

    The table contains several attributes necessary for conducting crime analysis:

    • offenseid—Unique identifier for each crime
    • offendate—Date of crime
    • fulladdr and zip5—Address, city, state, and ZIP Code for geocoding
    • ucrdesc—Type of crime

    Robberies attribute table

    Note:

    Your table may not be ordered in the same way.

  13. Close the table.

Configure and import robbery data

The table entries have spatial data in the form of addresses, but they haven't yet been mapped. To perform analysis, you must first import this data, map the robberies, and add them to your existing layer containing historical robbery data. You'll set up a geocoding tool to perform this process.

The Update Features With Incident Records tool is used to convert nonspatial tables to point features based on x,y-coordinates or street addresses and updates an existing dataset with the new or updated record information from the table.

Note:

Once you have successfully run the tool one time, you can automate it using ArcGIS Pro scheduling tools for daily imports.

  1. In the Contents pane, right-click the Precincts layer and choose Attribute Table.

    There are two fields, SHAPE_Area and SHAPE_Length that are set to read-only and will prevent you from publishing a web map later in the tutorial, so you will disable the read only property.

  2. Right-click the SHAPE_Area field and choose Fields.

    Fields option

    Notice that the Read Only column is checked for SHAPE_Area and SHAPE_Length.

    Read Only enabled

    You will uncheck read only for these two fields so that you are able to publish the layer.

  3. In the Read Only column, uncheck the boxes for SHAPE_Length and SHAPE_Area.

    Read only unchecked

  4. On the ribbon, on the Fields tab, in the Changes group, click Save. Close the Fields window and the table.

    Next, you will import incidents into the Robberies layer.

  5. On the ribbon, click the Crime Analysis tab. In the Data Management group, click Import Incidents.

    Select the Import Incidents button.

    In the Geoprocessing pane, the Update Features With Incident Records tool appears.

  6. In the Update Features With Incident Records tool, set the following parameters:
    • For Input Table, choose Robberies.csv.
    • For Target Features, choose Robberies.
    • For Location Type, choose Addresses.
    • For Address Locator, choose ArcGIS World Geocoding Service.

    Parameters for the Update Features With Incident Report tool

  7. For the Input Address Field column, set its fields to correspond with the following values from the Address Fields column:
    • For the Address field, choose fulladdr.
    • For the City field, choose municipality.
    • For the Postal field, choose zip5.
    • For Invalid Records Table, type InvalidRecordsLog.
    • Check the Update Existing Target Features box.

    Address Fields parameters

  8. Expand the Define Record Update Matching section and choose the following parameters:
    • For Input ID Field, select offenseid.
    • For Target ID Field, select offenseid.
    • For Input Table Last Modified Date Field, select reportdate.
    • For Target Features Last Modified Date Field, select reportdate.

    Define Record Update Matching parameters

  9. In the Geoprocessing pane, scroll down and expand the Fields section. For Field Matching Type, choose Use the field map to reconcile field differences.

    The tool automatically detects any fields in the input table containing identical names to the field names in the target layer. Any fields in the Output Fields column in red were not able to be automatically matched. If your input table contains data that matches a field in the target layer but has a different name, you must use the field map tool to manually associate the input table field to the target layer field.

  10. In the Field Map section, in the Output Fields column, select crimecateg. In the Source column, click Add New Source, check crimecategory, and click Add Selected.

    Field Map section of the Update Features With Incident Records tool

    All other output fields that are red are not associated to a field in the input table.

  11. Click Run.

    The tool geocodes robbery locations and adds the results to the Robberies layer. In addition, the tool creates a log file, containing details of any records that failed to import or geocode.

  12. On the Map tab, in the Navigate group, click Explore. Using the Explore tool, zoom in to the Robberies layer.

    Map of robberies

    You can now visualize the location of robberies on the map.

  13. In the Contents pane, right-click Robberies.csv and choose Remove.
  14. Save the project.

Enhance analysis attributes

In preparation for the CompStat meeting, you want to identify which crimes occurred on certain days of the week or at certain times of the day. To do so, you'll parse the original Report Date attribute into several date-and time-specific fields.

  1. On the ribbon, on the Crime Analysis tab, in the Data Management group, click Enhance Attributes and choose Add Date Attributes.

    Add Date Attributes

    The Add Date Attributes tool opens in the Geoprocessing pane. This tool separates a date field into multiple fields with more granularity. You can then identify patterns of occurrence by day of the week or time of day.

  2. In the Add Date Attributes tool, set the following parameters:
    • For Input Table, choose Robberies.
    • For Date Field, choose reportdate.
    Note:
    By default, the tool generates five new fields: day of the week, hour, month, day of the month, and year. You may remove these fields by clicking the Output Field Name and clicking the Remove button by the Output Time Format field.

    Add Date Attributes parameters

  3. Click Run.

    Next, you will view the attributes that were added to the table.

  4. Open the table for Robberies and scroll to the right.

    Fields added to Robberies layer

    The Robberies layer is now updated to include five new date part fields: reportdate_DW, reportdate_HR, reportdate_MO, reportdate_DM, and reportdate_YR.

    In addition to the day of the week and time of day, you want to identify the precinct or district in which each crime occurred. You can use the Join Attributes From Polygon tool to derive the precinct number of each robbery from the District ID field in the Precincts layer. When finished exploring, leave the table open.

  5. On the ribbon, in the Data Management group, click Enhance Attributes and choose Join Attributes From Polygon.

    Join Attributes From Polygon tool

  6. In the Join Attributes From Polygon tool, set the following parameters:
    • For Target Point Features, choose Robberies.
    • For Input Polygon Features, choose Precincts.
    • For Join Fields, choose District ID.

    Join Attributes From Polygon parameters

  7. Click Run.

    The Robberies layer is updated with the District ID field of the precinct.

  8. In the Robberies table, scroll all the way to the right to see the District ID field.

    Updated and new fields

    The reportdate_DW field contains the day of the week on which the robbery occurred, the reportdate_HR field contains the hour, the reportdate_MO field contains the month, the reportdate_DM field contains the day of the month, and the reportdate_YR field contains the year. The District ID field contains the precinct where the robbery occurred.

  9. Close the table and save the project.

You've imported robbery data from a CSV file and updated several fields for use in analysis.


Analyze crime statistics

Previously, you prepared your data. Next, you'll query and analyze the robbery data in preparation for the CompStat meeting. In particular, you'll determine the number of robberies in each precinct, the percentage change in robberies in each precinct, and the density and density change of robberies. You'll conduct analysis for four different time periods: the year to date, the previous year to date, the current 28 days, and the previous interval of 28 days.

The goal of your analysis is to determine the following:

  • Total number of robberies in each precinct
  • Percent change in each precinct for 28 days and previous 28 days
  • Percent change in each precinct for year to date and previous year to date
  • Density of robberies for current year to date and previous year to date

Create layers based on time

To analyze robberies based on when they were committed, you'll create layers that contain only robberies that occurred in a certain time period. You'll select robbery features from the existing layer that fit the proper date criteria and export them as new layers.

For the purposes of this exercise, you'll assume the current date is June 30, 2018. Thus, the year to date time interval is January 1, 2018, to June 30, 2018, and the previous year to date is the same interval but in 2017. You'll create a layer for the previous year to date first.

  1. If necessary, open your project.
  2. On the ribbon, click the Crime Analysis tab, and in the Selection group, click Select Layer By Date and Time.

    Select Layer By Date and Time

    The Select Layer By Date and Time tool opens.

  3. In the Select Layer By Date and Time tool, set the following parameters:
    • For Input Rows, choose Robberies.
    • For Date Field, choose reportdate.
    • For Selection Options, check Date.
    • Expand the Select by Date section, and for Date Selection Type, choose By Date Range.
    • For Start Date, type 1/1/2017.
    • For End Date, type 6/30/2017.

    Parameters for the Select Layer By Date and Time tool

  4. Click Ok.

    322 robberies committed between January 1, 2017, and June 30, 2017, are selected. Next, you'll create a temporary layer containing only the selected robberies.

  5. In the Contents pane, right-click the Robberies layer, point to Data, and click Export Features.

    The Export Features window appears.

  6. For Output Feature Class, type Robberies_PreviousYTD and click OK.

    A layer named Robberies_PreviousYTD is added to the map.

    Next, you'll create three additional layers for the three remaining time intervals of interest.

  7. On the Crime Analysis tab, in the Selection group, click Clear.

    Clear current selection

    The current selection is cleared. In the Geoprocessing pane, the Select Layer By Date and Time tool is still open. You will modify some parameters and run it again.

  8. In the Select Layer By Date and Time tool, use the same parameters as before, but change Start Date and End Date to the ranges below. After you run the tool for each selection, use the Export Features tool to create a layer using the following names:
    • Start Date: 1/1/2018, End Date: 6/30/2018, Layer name: Robberies_YTD
    • Start Date: 6/3/2018, End Date: 6/30/2018, Layer name: Robberies_Last28Days
    • Start Date: 5/6/2018, End Date: 6/2/2018, Layer name: Robberies_Previous28Days

    You now have the following four layers in the Contents pane:

    • Robberies_PreviousYTD
    • Robberies_YTD
    • Robberies_Last28Days
    • Robberies_Previous28Days
  9. Clear the selection.
  10. Uncheck the Robberies layer in the Contents pane to turn it off.
  11. Save the project.

Symbolize robberies by date

It will be useful to distinguish between robberies committed in the last and previous 28 days as well as those committed in the current and previous year to date. Next, you'll symbolize the data so each time period of robberies can be distinguished.

  1. In the Contents pane, right-click Robberies_Last28Days and click Symbology.

    The Symbology pane appears. These new layers will be used in the next step to determine the number of robberies within each precinct. The Robberies_PreviousYTD and Robberies_YTD layers will be compared to determine the percent changes of robberies within each precinct. The same comparison will be made of the Robberies_Previous28Days to Robberies_Last28Days layers. The results of this comparison will be used in the CompStat meeting story.

  2. In the Symbology pane, for Primary symbology, choose Single Symbol, and for Symbol, click the existing symbol.

    Change symbol

  3. In the Gallery tab, find the ArcGIS 2D symbol set and choose Circle 3. Click the Properties tab and update the Outline color to light red. Click Apply.

    The symbol on the map changes to show the red circle with a light red outline.

  4. In the Contents pane, click the layer Robberies_Previous28Days. For Primary symbology, choose Single Symbol, and click the existing symbol. Choose a bright orange shape fill color, such as Seville Orange, and a light orange outline color. Click Apply.
  5. Repeat the process to change the symbol for Robberies_YTD to a yellow circle (such as Solar Yellow) with a light yellow outline and symbol size of 6 pt and Robberies_PreviousYTD to gray circle (such as Gray 20%) with a dark gray outline and a symbol size of 6 pt. Click Apply after each change.

    Tip:
    To see the name of each color, hover over it.

  6. In the Contents pane, click the Precincts layer. In the Symbology pane, right-click the symbol and change the Color to Gray 70% and click Apply.

    Selection layers symbolized

    The layers showing robberies at different time periods are now symbolized with a color scheme, with red representing the most current and gray the oldest.

Determine robberies per precinct

Next, you'll calculate the number of robberies that occurred in each precinct for the year to date.

  1. In the Contents pane, uncheck all layers except Precincts and the three human geography basemaps.
  2. On the ribbon, click the Crime Analysis tab. Expand the Analysis Tools group by clicking the arrow in the bottom-right corner of the section.

    Expand Analysis Tools section

  3. Click Summarize Incident Count.

    Summarize Incident Count tool

    The Summarize Incident Count tool appears.

  4. In the Summarize Incident Count tool, set the following parameters:
    • For Input Features, choose Precincts.
    • For Input Summary Features, choose Robberies_YTD.
    • For Output Feature Class, accept the default name, Precinct_IncidentCount.
    • For Group Field, choose casestatus.

    Summarize Incident Count parameters

  5. Click Run.

    The new layer, named Precincts_IncidentCount, adds to the map. The color ramp displays the number of robbery incidents occurring within each precinct. Precincts with darker reds and browns have a higher number of robberies.

    Summary of incidents layer

    Next you'll create a custom label expression to include the precinct number as well as the incident count.

  6. Right-click the Precincts_IncidentCount layer, and click Label to turn on labels.
  7. Right-click the Precincts_IncidentCount layer and click Labeling Properties.
  8. In the Label Class pane, create the following expression: 'Precinct ' + $feature.districtid + TextFormatting.Newline + 'Incident Count: ' + $feature.TOTAL_CNT.

    To create the expression, complete the following:

    • Type 'Precinct ' +
    • From Fields, choose District ID
    • Type + TextFormatting.Newline +
    • Type 'Incident Count: '+
    • From Fields, choose Total Count

    Create label expression

  9. Click Apply and close the Label Class pane.

    Labeling updates and each precinct is now labeled with the precinct name or number and, on a new line, the number of robbery incidents.

    Incidents per precinct

  10. In the Contents pane, uncheck Precincts_IncidentCount and collapse its legend.

    You have summarized the incidents in the precincts and created a custom label class to display the precinct number and the total incidents that occurred in each precinct. Next, you will analyze trends in robberies.

Compute percent change in robberies

Next, you'll find out whether robberies have increased or decreased within each precinct in the past 28 days compared to the previous 28 days.

  1. On the Crime Analysis tab, in the Analysis Tools group, click Summarize Percent Change.

    Summarize Percent Change tool

    The Summarize Percent Change tool opens.

  2. In the Summarize Percent Change, set the following parameters:
    • For Input Features, choose Precincts.
    • For Input Current Period Point Features, choose Robberies_Last28Days.
    • For Input Previous Period Point Features, choose Robberies_Previous28Days.
    • For Output Feature Class, type Robberies_Last28Days_PercentChange.

    Summarize Percent Change parameters

  3. Click Run.

    A layer named Robberies_Last28Days_PercentChange is added to the map and displays the percent change in robberies within each precinct between the previous and current 28 days.

    Percent change in robberies for the last 28 days

  4. Label the Robberies_Last28Days_PercentChange layer and open its Labeling Properties.
  5. In the Label Class pane, create the following expression: round($feature.PERC,1)+'%'+TextFormatting.NewLine + $feature.CUR_CNT + ' from ' + $feature.PREV_CNT. Click Apply.

    Label Class Expression

    The percent changes are symbolized using a graduated color ramp. In the example image, darker blues represent the largest decreases in robberies (<10%), while darker reds represent the largest increases (>10%). Each precinct is labeled with the percent increase or decrease and the number of robberies in the last 28 days followed by the number of robberies in the previous 28-day period. Precincts 6 and 8 and Downtown experienced notable increases in robberies.

    You'll run the tool again to determine the percent change between the current and previous year to date.

  6. In the Contents pane, uncheck Robberies_Last28Days_PercentChange and collapse its legend.
  7. If necessary, reopen the Summarize Percent Change tool.
  8. In the Summarize Percent Change tool, set the following parameters:
    • For Input Features, choose Precincts.
    • For Input Current Period Point Features, choose Robberies_YTD.
    • For Input Previous Period Point Features, choose Robberies_PreviousYTD.
    • For Output Feature Class, type Robberies_YTD_PercentChange.

    Summarize Percent Change tool parameters for YTD

  9. Click Run.

    A layer named Robberies_YTD_PercentChange is added to the map. It displays the percent change in robberies within each precinct for the year to date.

    Percent Change YTD Map

    The percent changes are symbolized using a graduated color ramp where the darker blues represent the largest decreases in robberies, while the darker reds represent the largest increases. Blue precincts are where robberies decreased, while reds are where robberies increased. The largest increases in robberies occurred in precincts 3, 5, 6, 7, and 8 and downtown.

  10. Add labels to the Robberies_YTD_PercentChange layer by performing the following actions:
    • In the Contents pane, right-click the Robberies_YTD_PercentChange layer and choose Label.
    • Right-click the Robberies_YTD_PercentChange and choose Labeling Properties.
    • In the Label Class pane, create the following expression: round($feature.PERC,1)+'%'+TextFormatting.NewLine + $feature.CUR_CNT + ' from ' + $feature.PREV_CNT
    • Click Apply.

    Percent change labels

    Each precinct is labeled with the percent increase or decrease. The label also includes the number of robberies for the year to date, followed by the number of robberies in the previous year to date. When you investigate the map, only precinct 1 has a year to date decrease, and a majority of precincts have an increase of over 10 percent. The largest increases in robberies for the year to date are in precincts 6, 8, and Downtown. This is also consistent with the 28-day percent change map, so you can see a growing trend in these areas that will need to be addressed.

  11. Uncheck Robberies_YTD_PercentChange and collapse its legend.

Determine the density of robberies

Within your police precinct areas, in the areas where robberies have occurred most frequently, where can we place proactive police patrols to prevent further incidents? To answer these questions, you'll calculate hot spots using the Kernel Density tool for year to date and previous year to date robberies.

Note:

Kernel Density analysis is not performed on these layers on Robberies_Last28Days and Robberies_Previous28Days due to the low volume of data in these layers. Kernel Density analysis performs best when applied to datasets with larger volumes.

  1. In the Contents pane, verify that only the Human Geography layers and Precincts are visible.
  2. On the Crime Analysis tab, in the Analysis Tools group, click the down arrow and choose Kernel Density.

    Kernel Density tool

    The Kernel Density tool opens. The Kernel Density tool creates a raster image representing a grid across the extent of the area of analysis. For each grid cell, a density value is calculated which represents the number of features occurring within a search radius of the cell, weighted according to their distance from the cell. See our help documentation to learn more about how Kernel Density works.

  3. In the Kernel Density tool, set the following parameters:
    • For Input point or polyline features, choose Robberies_YTD.
    • For Output raster, type Robberies_YTD_Density.
    • For Output cell size, type 140.
    • For Search radius, type 2640.
    • Accept the defaults for Area units, Output cell values, and Method.
    • Click the Environments tab and for Mask, choose Precincts.

    Note:

    The value for Output cell size represents the size of each cell in the output grid. The value for Search radius is the search radius for how far from each cell the tool will go to search for countable incidents. The default map unit is feet; so the value entered is half a mile.

    Kernel Density parameters

  4. Click Run.

    A raster layer named Robberies_YTD_Density is added, but is being covered by the precincts.

  5. In the Contents pane, drag the Robberies_YTD_Density layer above the Precincts layer so it is visible.

    Density layer

    The density layer shows the magnitude of robberies across the entire jurisdiction. The mask limited the layer to the boundary of the precincts. The layer is symbolized with a multipart color scheme. You'll adjust the symbology to bring emphasis to the hotspots

  6. Right-click Robberies_YTD_Density and choose Symbology.
  7. In the Symbology pane, change Classes to 4.
  8. Expand the Color scheme menu, check Show names, and choose the Errors color scheme.
  9. Looking at the Upper value column, click the color symbol in the row of the lowest value.

    Select symbol for the lowest value in the Upper value column

  10. Change the symbology to No Color.

    No color for lowest value

  11. On the ribbon, on the Raster Layer tab, in the Rendering group, click Resampling Type and choose Cubic.

    This setting will make your hotspots have a rounder appearance and look less pixelated.

    Cubic Resampling tool

    In addition to a high-density concentration near the downtown precinct, there are several more high-density areas in precincts 4 and 9. There could be several reasons for these concentrations, such as high-density housing areas with more opportunities for robbers and other environmental factors .

    Next, you'll create a density layer for robberies committed in the previous year to date.

  12. If necessary, reopen the Geoprocessing pane and the Kernel Density tool. Set the same parameters as before but change Input point or polyline features to Robberies_PreviousYTD and Output raster to Robberies_Previous_YTD_Density.

    Kernel Density parameters for previous YTD

  13. Click Run.

    A layer, named Robberies_Previous_YTD_Density adds to the map.

    This layer also shows that the highest density of robberies occurred near the Downtown precinct. Visual comparison reveals little change in the concentration of robberies. You'll see if the concentration changes for the year to date and the previous year to date.

You now have two density layers that show concentrations of robberies year to date and the previous year to date.

Calculate change in density

The last analysis you'll perform will determine how the density of robberies has increased or decreased within each precinct in the current year to date compared to the previous year to date.

  1. On the ribbon, on the Crime Analysis tab, in the Analysis Tools group, click Minus.

    Minus tool

    The Minus tool opens. You can use the Minus tool to subtract the kernel density of a previous period from the kernel density of a current period to understand how density has changed over time.

    Note:

    When using the Minus tool to compare kernel densities of two time periods, ensure that the input kernel densities were generated using identical tool parameters to achieve an accurate result.

  2. In the Minus tool, set the following parameters:
    • For Input raster or constant value 1, choose Robberies_YTD_Density.
    • For Input raster or constant value 2, choose Robberies_Previous_YTD_Density.
    • For Output raster, type Robberies_YTD_DensityChange.
    • Click the Environments tab and set Mask to Precincts.

    Minus tool parameters

  3. Click Run.

    The layer displays change in the density of robberies year to date compared to the previous year to date, but it needs to symbolized to clearly communicate its meaning.

  4. Right-click the Robberies_YTD_DensityChange layer and click Symbology.
  5. Change the Primary Symbology style from Stretch to Classify.
  6. Set Method to Geometric Interval.
  7. Click Color scheme and choose Red-Blue (Continuous).
  8. Click More, and click Reverse symbol order.

    This makes the red areas reflect increased values and blue areas reflect decreased values.

  9. Click the white color category. Change white color to No Color.
  10. For the light red and light blue categories, set these to No Color so that only the dark red and blue categories remain visible.

    These two categories represent the areas of greatest increase and decrease in year to date concentration of robberies compared to last year to date.

  11. On the ribbon, on the Rater Layer tab, in the Rendering group, set the Resampling Type to Cubic to give your hotspots a smoother look.
  12. Turn off the Robberies_Previous_YTD_Density and Robberies_YTD_Density layers, and turn on the Robberies_YTD and Robberies_PreviousYTD layers in the Contents pane.

    The blue areas of the Robberies_YTD_DensityChange layer should correspond with the presence of robberies from last year, and a few robberies this year, while the red areas should correspond to many robberies this year, but few from last year.

    Density Change map

    The Robberies_YTD_DensityChange layer reveals an increase in the concentration of robberies near the Downtown precinct. It also reveals changes within each precinct that were not obvious by visual comparison alone.

  13. Save the project.

You've performed kernel density analysis on robbery data to identify robbery hotspots for the current and previous year to date. Using the Minus tool, you have also determined the change in density of year to date robbery incidences. This information will be used during the CompStat meeting to help command staff allocate proactive resources to address these problem areas.


Share the results

Previously, you analyzed robberies over space and time. In this section, you'll share your analysis results using ArcGIS StoryMaps. First, you'll publish your maps to ArcGIS Online.

Publish density layers

To prepare the map for sharing as a web layer, you will first remove all the layers that are not necessary for the story.

  1. If necessary, open the CrimeAnalysisSolution project.
  2. In the Contents pane, right-click each of the following layers and choose Remove:
    • Robberies_PreviousYTD_Density
    • Robberies_YTD_Density
    • Precinct IncidentCount
    • Robberies

    Next, you'll publish the Robberies_YTD_DensityChange layer to your ArcGIS organization. Because it is a raster layer, it needs to publish to ArcGIS Online as a separate map service.

  3. Right-click Robberies_YTD_DensityChange, point to Sharing, and click Share As Web Layer.
  4. In the Share As Web Layer tool, set the following parameters:
    • For Name, add your initials to the end of Robberies_YTD_DensityChange.
    • For Summary, type A kernel density output shows the change in density between the previous and current YTD robbery hotspots.
    • For Tags, type Law Enforcement.
    • For Layer Type, click Tile.
    • For Folder, type CompStat. This will create a new folder called CompStat.
    • For Share with, check the box for your organization.

    Share As Web Layer parameters for the YTD density change map

  5. Click Publish.

    A note appears indicating the web map was successfully published.

Publish web map

Next, you'll publish the remaining analytical layers as a web map to your ArcGIS organization.

  1. On the ribbon, click the Share tab. In the Share As group, click Web Map.
  2. In the Share As Web Map tool, set the following parameters:
    • For Name, type CompStat Briefing Map, followed by your initials.
    • For Summary, replace the existing text with A web map to support the CompStat briefing story.
    • For Tags, replace the existing tags with Law Enforcement, Public Safety, Police, and Crime Analysis.
    • For Folder, choose CompStat.
    • For Share with, check the box for your organization.

    Share As Web Map parameters

  3. For Finish Sharing, click Analyze.

    Analyze button

    Analyze checks for any issues with the maps that would prevent sharing in a web map format.

    Note:

    Depending on your version of ArcGIS Pro you may receive an error on assignment of unique IDs. If you did not receive this error, skip to step 6.

  4. In the Share As Web Map pane, for the Unique numeric IDs are not assigned error, click on the Options button and in the drop-down menu choose Open Map Properties To Allow Assignment.

    Unique numeric IDs error

  5. In the Map Properties window, enable Allow assignment of unique numeric IDs for sharing web layers and click OK.

    Map properties window.

  6. In the Share As Web Map pane, click Share.

    The publishing process may take several minutes. When it has finished, a message appears at the bottom of the Share As Web Map pane.

  7. On the message banner, click Manage the web map.

    Link in sharing status banner

    The web map's item details page appears in a browser. You will use this in the next step.

  8. In ArcGIS Pro, save and close the project.

Configure the web map

Next, you'll create a story using ArcGIS StoryMaps to share your results. A story made with ArcGIS StoryMaps is an interactive map combined with narrative text, images, and multimedia content that can be shared online. You'll create a story that shows where the number of robberies has changed within each precinct that you can present at your CompStat meeting. The story will be built from the web map you published and will contain web layers representing the robbery analysis results that you created.

First, you'll add your density layers to the map.

  1. On the CompStat Briefing Map item details page, click Open in Map Viewer.

    Open in Map Viewer

    Note:

    Depending on your organizational and user settings, you may have opened Map Viewer Classic. ArcGIS Online offers two map viewers for viewing, using, and creating maps. For more information on the map viewers available and which to use, please see this FAQ.

    This tutorial uses Map Viewer.

  2. On the Contents (dark) toolbar, click Add and click Browse layers.

    Add layer

  3. Confirm you are searching under My Content. In the search bar type robberies and press Enter.
  4. In the search results, locate Robberies_YTD_DensityChange and click the Add button.

    Search and add density change layer

    The layer Robberies_YTD_DensityChange is added to the Contents pane.

  5. Close the Browser layers pane.
  6. On the Contents (dark) toolbar, click Layers.
  7. In the Layers pane, hide all layers except Robberies_YTD_Density_Change and Precincts by clicking the Hide layer button.

    Because the layer Robberies_YTD_Density_Change is a tile feature layer, it cannot be moved above the Precincts layer. You will instead change the symbology for Precincts so both layers are visible.

  8. Click on the Precincts layer to activate the Settings (light) toolbar.
  9. In the Settings toolbar, click on Styles.

    Change Style button

  10. In the Styles pane, under Pick a style, for Location (single symbol), click the Style options button.
  11. For Symbol style, click the edit button to open the Symbol style pane.
  12. In the Symbol style pane, set the following parameters:
    • For Fill color, click on the No color button.
    • For Outline color, click the edit button and under Hex type #ffffff and click Done.
    • For Outline transparency, set it at 50%
    • For Outline width, set it at 1px.

    Outline symbol for Precincts layer

  13. Click Done two times.

    Precincts symbology updated so density change layer is visible

  14. In the Settings toolbar, click on Pop-ups. Use the toggle to disable pop-ups.

    Pop-ups pane.

    You will not need pop-ups for the Precincts layer because you will configure pop-ups with information about the precincts in the percent change layers.

    Next, you will update and configure the Robberies_Last28Days_PercentChange layer for publication.

  15. On the Layers pane, click the Robberies_Last28Days_PercentChange layer and turn on the layer.
  16. On the Settings toolbar, click on Pop-ups.
  17. In the Pop-ups pane, confirm that Title shows {name} and click on Fields list.
    Fields List.
  18. In the Fields list, delete all except the following fields:
    • Current Count
    • Previous Count
    • Difference
    • Percent Change

    Field list

  19. On the map, click any precinct to review the pop-up.

    Pop-up text for robberies last 28 days percent change

  20. Similarly for Robberies_YTD_PercentChange layer, configure the pop-ups with the same fields

    Next you will prepare the pop-ups for each robbery incidence.

  21. In the Layers pane, turn on the Robberies_Last28Days layer and configure the pop-up to display the Title as ucrdesc field.

    Update Pop-up Title

  22. Click Fields list and remove all fields except the offenseid, fulladdr, and offendate fields. For each field, click the value in the Field Alias column and rename the fields, respectively, Offense ID, Full Address, and Offense Date.

    Select fields to display in pop-ups and provide field alias values.

  23. On the map, click any robbery point to review the pop-up.

    Pop-up with robbery information

  24. Configure the pop-ups for the layers Robberies_Previous28Days, Robberies_YTD, and Robberies_PreviousYTD, using ucrdesc as the title, and showing only the offenseid, fulladdr, and offendate fields. Also change their aliases as you did before.

    You have almost completed setup and configuration of the first of the four maps you will use in the CompStat meeting.

  25. In the Layers pane, turn off all the layers except Robberies_Last28Days_PercentChange.
    Note:

    Other layers in the web map will be displayed on different slides in the ArcGIS StoryMaps builder.

  26. On the Contents toolbar, click Save and open and click Save.

You have now created a web map and web layer containing a variety of analyses for the CompStat meeting, including Robberies 28 Day Percent Change, Robberies YTD Percent Change, and Robberies YTD Density Change. You will be presenting these analysis layers in an interactive briefing using ArcGIS StoryMaps during the CompStat meeting.

Create a CompStat story

In preparation for the CompStat meeting, you must assemble and configure an interactive briefing illustrating the results of your analysis of robberies. To prepare the briefing, you will use the ArcGIS StoryMaps builder.

  1. Sign into your ArcGIS organization, browse to the Content section, and click the Create app button.

    Create button

  2. From the list of apps, choose ArcGIS StoryMaps.

    Your map automatically loads into the story builder with placeholder text.

  3. In the ArcGIS StoryMaps builder, click Title your story and type CompStat Meeting. For the subtitle, type Robbery cases in Naperville, Illinois.

    Story title and subtitle

  4. On the ribbon, click Design.

    The Design panel appears. Changes made in the Design panel will affect the entire story design.

  5. In the Optional story sections section, turn on Navigation.

    Navigation option turned on

    Next, you will update the story theme. Themes are a combination of preset design specifications, like font and colors scheme, that can help illustrate a story's tone and feel.

  6. For Theme, choose Obsidian.

    Obsidian theme

    The story updates with the Obsidian theme, giving the story a serious tone.

  7. Below the headings bar, click the Add Content Block button and click Sidecar.

    Add a sidecar block

    Sidecar is an immersive block with a side-by-side reading experience. Each slide includes a media panel, where you will feature your maps, and a scrolling narrative panel where you will add text describing the analysis maps.

  8. Select Floating panel and click Done.
  9. Click Add, click Map, and select your CompStat Briefing Map.
  10. Zoom and pan the map to center on your project area, and click Place Map.

    Place map into your story

  11. In the Sidecar narrative panel, click Continue your story and type 28 Day Percent Change Map. Highlight the text and click Paragraph and choose Heading.

    Sidecar narrative panel

    The text updates to the Heading format.

  12. Click the Add content block button below the subheading and select Text.
    Add content block in floating panel text box
  13. Type This map shows the percent changes in robberies by precinct in the last 28 days. Darker blues represent the largest decreases in robberies, while darker reds represent the largest increases in robberies.
  14. Highlight the text largest decreases in robberies, and in the text edit bar, click the bold button and the change color button. Choose a blue color.

    Edit text color

  15. Change the style of the text largest increases in robberies to bold and a red color.

    Now your text reflects the symbology of the map, making it easier for viewers to interpret the map.

  16. Click the Add Content button again, select Text, and type Precincts 6 and 8 and Downtown experienced notable increases in robberies.

    The first map in your story is complete.

    First map is ready

  17. Below the last sentence, click the Add content block button and click Map action.

    A button appears that you can configure to change which layers in your map are visible.

    Map action button adds to the story
  18. Click Describe this map action and type Robberies in the Previous 28 Days.
  19. Point to the map action button and click the Edit button.

    Edit map action button

    The Configure map action window appears with your CompStat map.

  20. Under All features, click the visibility button to turn on Robberies_Previous28Days, and click Save action.

    Make a layer visible using a map action.

    The map action button is configured to show the layer Robberies_Previous28Days when it is clicked.

  21. Add another map action button with the text Robberies in the Current 28 Days, and edit the action so RobberiesLast28Days_PercentChange and Robberies_Last28Days are visible.
  22. Add third map action button with the text Current and Previous 28 Days, and edit the action so RobberiesLast28Days_PercentChange, Robberies_Last28Days, and Robberies_Previous28Days are visible.

    You now have three map action buttons configured to show robbery cases in the last and previous 28 days.

    28 Day Percent Change Sidecar with map action buttons complete

You have now successfully added and configured your first section showing current and previous 28-day robberies.

Add more sections

Next you will add sections for the YTD Percent Change and Robberies YTD Density Change maps.

  1. Scroll down past your first map and click the Add content block button, select Sidecar, choose Floating panel, and click Done.
  2. Click Add, click Map, and choose the CompStat Briefing Map.
  3. Click the visibility buttons so that Robberies_YTD_PercentChange is the only layer visible.
  4. Zoom and pan the map to center on your project area and click Place Map.
  5. Update text in the floating text box to Year-to-Date Percent Change Map, change the paragraph style to Heading, and add another text content block and type This map shows the percent change in robberies within each precinct for the year-to-date. Darker blues represent the largest decreases in robberies, while darker reds represent the largest increases in robberies.
  6. Add another text block and type The largest increases in robberies occurred in precincts 3, 5, 6, 7, 8, and Downtown.
  7. Highlight the text largest decreases in robberies and change it to bold and blue. Highlight the text largest increases in robberies and change it to bold and red.
  8. After the last sentence, add three Map action buttons.
  9. Rename the buttons and edit map visibility layers as follows:

    Map action text

    Visible layers

    Previous Year-to-Date

    Robberies_YTD_PercentChange

    Robberies_PreviousYTD

    Current Year-to-Date

    Robberies_YTD_PercentChange

    Robberies_YTD

    Previous and Current Year-to-Date

    Robberies_YTD_PercentChange

    Robberies_YTD

    Robberies_PreviousYTD

    YTD Percent Change Sidecar

  10. Below the Year-to-Date Percent Change sidecar, add a third Sidecar, choose Floating panel, and click Done.
  11. Click Add, click Map, and choose the CompStat Briefing Map.
  12. Click the visibility buttons so that Robberies_YTD_DensityChange and Precincts are the only visible layers.
  13. Zoom and pan the map to center on your project area and click Place Map.
  14. Update text in the floating text box to Year-to-Date Density Change Map, change the paragraph style to Heading, and add another text content block and type This map shows the density change in robberies within each precinct for the year-to-date. Darker blues represent the largest decreases in robberies, while darker reds represent the largest increases in robberies.
  15. Add another text block and type The concentration of robberies in the Downtown precinct increased.
  16. Highlight the text largest decreases in robberies and change it to bold and blue. Highlight the text largest increases in robberies and change it to bold and red.
  17. After the last sentence, add three Map action buttons.
  18. Rename the buttons and edit map visibility layers as follows:

    Map action text

    Visible layers

    Previous Year-to-Date

    Robberies_YTD_DensityChange

    Precincts

    Robberies_PreviousYTD

    Current Year-to-Date

    Robberies_YTD_DensityChange

    Precincts

    Robberies_YTD

    Previous and Current Year-to-Date

    Robberies_YTD_DensityChange

    Precincts

    Robberies_PreviousYTD

    Robberies_YTD

    Third sidecar complete

    You now have three sidecars in your story, each showing the analysis maps and three map action buttons to view different layers of robbery data.

  19. On the ribbon, click Preview to preview your finished story.

    Your CompStat Meeting story is now operational. You have completed the analysis on robberies data using the Crime Analysis solution tools, and you produced a story of results in preparation for the CompStat meeting.

  20. To return to edit mode, click Close preview icon at the bottom of the page. Click Publish, and for Set sharing level, click My organization, and click Publish.
    Note:

    You can share your story publicly, or, if you're using an ArcGIS account, you'll also see the option to share your story so it is only accessible within your organization.

    The ArcGIS StoryMaps builder loads the published story.

    A window appears asking if you want to share the following items.

  21. In the Content authentication needed window, click on CompStat Briefing Map.

    This take you to the item details page of the web map.

  22. In the item details page, click on the Share button and choose Organisation. Click Save.
  23. Return back to CompStat Meeting tab.
  24. Click Yes, publish anyway.

Using ArcGIS Solutions, you downloaded and deployed the Crime Analysis solution and used it for analyses of robbery data. Now that you've downloaded the add-in, if you want to deploy additional solutions in the future, you can access them through the Share tab in ArcGIS Pro. To learn more about ArcGIS Solutions, visit the ArcGIS Solutions web page which highlights the various solutions available for multiple industries across all ArcGIS products and applications.

You can find more tutorials in the tutorial gallery.